I have form-like editTexts and my softkeyboard is overlapping editText field. In my FragmentActivity I just set windowSoftInputMode=“adjustResize” in my AndroidManifest (or in onCreate()) and it works. But in my regular Activity I set this and it doesnt work at all.
I cant set android:fitsystemwindow="true" because it will destroy my layout with transparent statusBar and not transparent navigationBar.
AndroidManifest
<activity
android:name=".ProfilePackage.EditProfile.EditProfileActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
android:label="#string/app_name">
</activity>
<activity
android:name=".Activities.CommentActivity"
android:windowSoftInputMode="adjustPan" />
I had the same Problem where the Softkeyboard was covering other views. So I added this line in manifest.
Related
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?
use adjustNothing instead of adjustPan in parent activity
I have added adjustPan in Manifest.xml file here is my Activity tag in Manifest.xmlandroid:name=".LoginActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="#style/Theme.Sherlock.NoActionBar"
android:windowSoftInputMode="adjustPan"
Problem is this when I added adjustPan my Selection bar(CAB) is hidden. When I remove adjustPan from Manifest.xml Its showing perfect. Let me know what's wrong with adjustPan?
In my application Preference Setting Activity is not showing correctly sometimes. It goes black.
My Original Preference Activity
But sometimes it goes black and shows as below screenshot
no check boxes and list preference are visible.
When it goes black and I scroll It looks very poor
The Declaration in Manifest file
<activity
android:name="com.test.wallpaper.PreferenceSettingActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
You have need to set Background for parent layout in this xml page.
Use setbackground for parent layout in xml.
I have a NavigationDawer with some fragments which contain EditTexts. 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
Remove the code:
android:windowSoftInputMode="adjustResize"
from manifest file.
Have you tried setting the windowSoftInputMode to adjustPan?
adjustResize will resize the activity to allow room for the keyboard, which is the behaviour you are experiencing. If you set the windowSoftInputMode to adjustPan, the activity will be be 'panned', or moved upwards to make room for the keyboard.
android:windowSoftInputMode="adjustPan"
I have a numberpicker but my keyboard is not showing up like I want.
Screen:
As you can see, the keyboard covers part of the edittext.
How can I fix this without using a scrollview?
I've already tried setting android:windowSoftInputMode="adjustPan" or "adjustResize".
When I use scrollview I get the following problem :
Screen shifts a bit when change focus to next edittext
Thx :)
in manifest file set activity attribute
android:windowSoftInputMode="adjustResize|stateHidden"
like :
<activity
android:name=".LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustResize|stateHidden" >
it should work