I'm using AppCompat v21
with the Style "NoActionBar" and add a Action/Toolbar in onCreate
.
Also a SlidingMenu of Feinstein is added and that causes the problem that the that the Activity (and therefore the inside Fragments) overlap with the navigation buttons of Android (it is not fully shown, cut off at the bottom)
if i add:
android:layout_marginBottom="48dp"
in the layout it everything is visible (of course).
On Android 4.4. everything is shown properly.
What am I missing on Android L using the support lib?
SlidingMenu added in onCreate:
super.onCreate(..)
setContentView(..)
menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
menu.setMenu(R.layout.menu);
menu.setBehindWidthRes(200dp);
Solution:
The issue is stated here https://github.com/jfeinstein10/SlidingMenu/issues/680 (including the solution)
Slding Menu to SLIDING_CONTENT
OR: update the SlidingMenu source like mentioned in the link aboce
Better Solution:
(also working with Samsung devices on 5.0) - provided by withaay
Adding the following lines to the SlidingMenu constructors has worked for me. I didn't have to make any other code changes.
if(Build.VERSION.SDK_INT >= 21) setSystemUiVisibility(SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)
Adding the following lines to the SlidingMenu constructors has worked for me. I didn't have to make any other code changes.