My own solution: https://coding.net/u/tianshaokai/p/MaterialDesignDemo/git Two ways to implement Material Design in lower versions https://github.com/Witype/ SystemBarTintDemo https://github.com/Witype/ToolbarStatusDemo
It is very simple to implement status bar immersion, and you only need to define the following theme in under values-v19 through style configuration styles.xml, and determine the application theme as this theme in Manifest.xml.
android:windowTranslucentStatus means the status bar is transparent android:windowTranslucentNavigation means the navigation bar (virtual button bar) is transparent
Immersion is a trivial matter. The key trouble lies in the changes in the layout of layout and the optimization of fitsSystemWindows. I tell you from experience that SystemBarTint is already the simplest solution.
For top view, you can use style,
But the window flag still requires code to determine version support,
cannot be expressed in style, and style itself cannot make the difference in version identification.
activity_main.xml
MainActivity.java
My own solution: https://coding.net/u/tianshaokai/p/MaterialDesignDemo/git
Two ways to implement Material Design in lower versions
https://github.com/Witype/ SystemBarTintDemo
https://github.com/Witype/ToolbarStatusDemo
It is very simple to implement status bar immersion, and you only need to define the following theme in
under
values-v19
through style configurationstyles.xml
, and determine the application theme as this theme inManifest.xml
.android:windowTranslucentStatus
means the status bar is transparentandroid:windowTranslucentNavigation
means the navigation bar (virtual button bar) is transparentImmersion is a trivial matter. The key trouble lies in the changes in the layout of
layout
and the optimization offitsSystemWindows
.I tell you from experience that SystemBarTint is already the simplest solution.