问题
I am trying to develop a full-screen app with 2 main activities: LoginActivity and DashboardActivity.
LoginActivity has only the UI for user input to login like Username and password. In this screen the nav and status bar gets hidden completely without leaving any space.
After login in the DashboardActivity I have a toolbar with Navigation drawer. In this activity I did all things I did in LoginActivity. What happens is the Nav and status bar gets hidden but the space occupied by Nav bar before hiding alone stays.
This happens only in Android 5+. It works fine in Kitkat.
Here are the snapshots: Before Hiding / After Hiding
回答1:
I am also stucked to same problem .Easy to fix remove this tag from xml fitsSystemWindows from drawerlayout and from navigation view
set height of navigation view to wrap content
来源:https://stackoverflow.com/questions/41198934/navigation-bar-hides-but-leaves-space-when-using-navigation-drawer-in-android-5