Android Soft-Key-Buttons hide view's content

删除回忆录丶 提交于 2019-11-30 22:54:56

I can imagine three different scenarios:

  1. (Unlikely)You do something with LayoutParams Flags of your Window(like getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);) and/or Theme's styles

  2. (Unlikely. It was my initial though, but layout_alignParentBottom="true" should handle it for you)You don't have enough space on the screen. Can you wrap your RelativeLayout into a ScrollView(it'd require you to change RelativeLayout's height to wrap_content) and see the result? (If you set match_parent to the RelativeLayout it does not mean it'd fit all content into the screen sizes. Content can easily get out of the screen, like on the screenshot you provided. But again, layout_alignParentBottom="true" handles it.

  3. (Most likely) You have some margins/paddings in the Activity(especially, something like android:layout_marginBottom="-XXdp"), which hosts Fragment. So fragment is rendering correctly, but the Activity moves it below the screen.

To speak more precisely, it'd be nice to have @style/AppBaseTheme here, Activity's layout and if you do something suspicious with getWindow() - this piece of code.

Let me know, if it helps or not!

This one worked for me, just add it to your v21/styles.xml

<item name="android:windowDrawsSystemBarBackgrounds">false</item>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!