SystemBarTint, an open-source library in the Android immersive notification bar, is easy to use and the android immersive Status Bar
SystemBarTint link: https://github.com/jgilfelt/SystemBarTint
The concept was first heard at the MI4 press conference. A concept advocated by rebuss turned the original bright and black notification bar into a color consistent with the APP theme, it was learned that Android already had this concept (ImmersiveMode) starting from 4.4.
The effect is as follows:
The usage is relatively simple. An official example is provided:
Public class MatchActionBarActivity extends Activity {@ Overrideprotected void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); setContentView (R. layout. activity_match_actionbar); if (Build. VERSION. SDK_INT> = Build. VERSION_CODES.KITKAT) {setTranslucentStatus (true);} SystemBarTintManager tintManager = new SystemBarTintManager (this); tintManager. setStatusBarTintEnabled (true); tintMa Nager. setStatusBarTintResource (R. color. statusbar_bg); // color required in the notification bar} @ TargetApi (19) private void setTranslucentStatus (boolean on) {Window win = getWindow (); WindowManager. layoutParams winParams = win. getAttributes (); final int bits = WindowManager. layoutParams. FLAG_TRANSLUCENT_STATUS; if (on) {winParams. flags | = bits;} else {winParams. flags & = ~ Bits;} win. setAttributes (winParams );}}