2

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?

Adrian Sicaru
  • 1,382
  • 1
  • 11
  • 20

1 Answers1

2

use adjustNothing instead of adjustPan in parent activity

Suhail Mehta
  • 5,514
  • 2
  • 23
  • 37
  • Thank you, it works like a charm. The weird thing is that this setting is not specified in the Android guide here http://developer.android.com/guide/topics/manifest/activity-element.html . It seems an important thing to miss, to me. – Adrian Sicaru Oct 02 '14 at 08:16