Adrian Sicaru
Adrian Sicaru

Reputation: 1422

SoftKeyboard in Dialog Activity pans the activity behind

Just as the title says, from one activity I start a dialog activity that contains an editText. When I click it and the softKeyboard comes up, it pans the DialogActivity but it also affects the activity behind.

This is the manifest entry for the parent activity

<activity
        android:name=".BasketStep2Activity"
        android:parentActivityName=".home.Start"
        android:windowSoftInputMode="stateAlwaysHidden|adjustPan" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value=".home.Start" />
    </activity>

and this is the manifest entry for the dialog activity

<activity
        android:name=".SelectRelais"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustPan|stateHidden" 
        android:theme="@style/AppDialog" >
    </activity>

The parent activity pans to the bottom as if there was an editText with focus there. If i use "adjustResize", everything is obviously messed up. Is there a way to prevent any changes to the background activity?

Upvotes: 2

Views: 669

Answers (1)

Suhail Mehta
Suhail Mehta

Reputation: 5542

use adjustNothing instead of adjustPan in parent activity

Upvotes: 2

Related Questions