softInputMode in fragments

android, android-activity, fragment, navigation-drawer

Solution

Remove the code:

`android:windowSoftInputMode="adjustResize"`

from manifest file.

Problem

I have a `NavigationDawer` with some `fragments` which contain `EditText`s. When I 'open' the fragment, the layout is fine (ie. not squashed) but when I bring the keyboard up, the layout becomes squashed. I searched around and added this to the manifest: ``` <activity android:name=".Navigation_Drawer" android:label="@string/app_name" android:windowSoftInputMode="adjustResize" > // This being the important part <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> ``` Because the Navigation Drawer is the only activity that contains/starts these fragments, the fragment's softInputMode should be controlled by the activity, but this code does not make any difference Thank you

Original source