Navigation bar hides but leaves space when using n

2019-05-18 17:35发布

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条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-05-18 17:53

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

查看更多
登录 后发表回答