Navigation bar hides but leaves space when using navigation drawer in android 5+

假如想象 提交于 2020-01-11 06:25:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!