I\'m having troubles with layouts being too large on Devices with Soft-Key-Buttons on Android:
Summing up, my question is why a layout, which is configured as
This one worked for me, just add it to your v21/styles.xml
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
I can imagine three different scenarios:
(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
(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.
(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!