Systembartint Link: https://github.com/jgilfelt/SystemBarTint
The first to listen to this concept is in the MI4 press conference, rebels advocated a concept, let the original Enron, Black notice bar, into the theme of the app with the color, after degrees Niang, learned from 4.4, Android already has this concept (Immersivemode).
The effect is as follows:
The use of the method is relatively simple, the official gave an example:
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); Tintmanager.setstatusbartintresource (R.COLOR.STATUSBAR_BG);//notification bar required color} @TargetApi 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);}}
An open source library for the Android immersive notification bar Systembartint simple to use