Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Lollipop navigation bar overlays activity view

Tags:

android

the navigation bar is overlaying my activity view on the bottom. Same issue like here: Android Navigation Bar overlaying my view

The issue seems to happen only on Android Lollipop. On my Moto G with KitKat 4.4.4. i don't have this issue. I don't know why this problem is only related to Lollipop.

My problem is, with the solution @ps-glass postet is not working for me somehow setting fitsSystemWindow = true. I tried it with the theme or with the layout file directly, nothing worked for me so far.

Here is an image: https://drive.google.com/file/d/0B5g_MttTC7ZIQzNfS3Y2dVFKSFk/view?usp=sharing

You can only see a bit of the text, the rest is overlaid by the navigation bar.

like image 863
Moritz Avatar asked Feb 24 '15 10:02

Moritz


1 Answers

I found out that this problem is related to a library we are using: https://github.com/jfeinstein10/SlidingMenu and other people have this problem too after they updated their AppCompat to v21.

Some solutions were posted here https://github.com/jfeinstein10/SlidingMenu/issues/680 and another one here The getDecorView method return view include navigation bar view on lollipop?

The Solution from https://stackoverflow.com/users/715451/saulobrito is working for me now and it is the easiest way i think.

<style name="Theme" parent="FrameworkRoot.Theme">
    <item name="android:windowDrawsSystemBarBackgrounds">false</item>
</style>

I put this code snippet to a my theme in the res/values-v21 folder.

like image 64
Moritz Avatar answered Oct 20 '22 13:10

Moritz