With this code in my activityLayout
, layouts don't moves up when keyboard is open:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.WRAP_CONTENT);
When I delete this code, everything works fine and layouts move up. But I need to have this code in the activity.
How can I solve this?
Put this in your manifest file:
<activity name="YourActivity"
android:windowSoftInputMode="stateVisible|adjustResize">
...
</activity>
Add this to layout file
android:fitsSystemWindows="true"