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"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.