Let say I have the following layout:
when I click on the edit text at the bottom I get this:
As you can notice the image from the top goe
well, I have not mentioned any "windowSoftInputMode" in my app's manifest and it runs fine. Screen does not move up when the keyboard opens up. Try this approach - just remove the "windowSoftInputMode" parameter from your manifest .
Try this, for me it worked...
<CoordinatorLayout
android:fitsSystemWindows="true">
<AppBarLayout>
<Toobar>
<!--...-->
</Toobar>
</AppBarLayout>
<include layout="@layout/content_main_message" /> <!--EditText here-->
</CoordinatorLayout>
Try this:
android:windowSoftInputMode="adjustNothing"
Try using
android:windowSoftInputMode="adjustPan|adjustResize"
for the activity.
I already had a windowsoftInputMode to prevent the keyboard from opening, so just add the comment code
android:windowSoftInputMode="stateHidden|adjustPan|adjustResize"
My EditText kept moving up as well.
Adding gravity to the Edit Text seems to solve the problem. The Keyboard was pushing my EditText up, so I added gravity to the bottom of the Edit Text in the XML.
android:gravity=bottom