Search code examples
androidandroid-actionbaractionbarsherlocknavigation-drawer

Navigation drawer being cut off by Sherlock ActionBar in Galaxy 3 and 5 phones


I have been testing this app on simulators and my test Android phone but some people are seeing the navigation drawer below go above the actionbar to the top cutting off two menu items. Does anyone know what I should look for on how to fix this since I cant replicate it myself? I was able to replicate this in version 4.4.2 but not anything below it in the simulator.

enter image description here


Solution

  • Looks like adding this to my theme

    <item name="windowActionBarOverlay">true</item>
    

    and removing this from my onCreate worked

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        Window w = getWindow();
        w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    }