When using the navigation drawer in Android 5, the navigation bar is hidden but leaves space

I'm trying to develop a full screen application with two main activities: loginactivity and dashboardactivity

Loginactivity can log in only the user interface entered by the user (such as user name and password). In this screen, the navigation bar and status bar are completely hidden without any space

After logging in to dashboardactivity, I have a toolbar with a navigation drawer. In this activity, I do everything I do in loginactivity. What happens is that the navigation and status bar are hidden, but the space occupied by the navigation bar before it is hidden separately remains

This only happens in Android 5. It works normally in KitKat

The following is a snapshot: before hiding / after hiding

resolvent:

I also encountered the same problem. It is easy to fix and can be removed from XML fitssystemwindows from drawer layout and Navigation view

Sets the height of the Navigation view to wrap the content

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>