Android4.4 new features, System status bar integration.
The steps to be implemented include the following:
1.android4.4 or later
2. Set the app fullscreen:
Method: Set Android:theme= "@android: Style/theme.translucent.notitlebar" in Androidmanifest.xml
3. Load Nineoldandroids-2.4.0.jar
4. Implementation class: Set the status bar background to full transparency.
The project structure diagram is as follows:
The main method of invocation is implemented in Mainactivity.java as follows:
public class Mainactivity extends activity{@Overrideprotected void OnCreate (Bundle savedinstancestate) {super.oncreate (savedinstancestate); Settranslucentstatus (); Setcontentview (R.layout.activity_main);} /** * Sets the status bar background state */private void Settranslucentstatus () {if (Build.VERSION.SDK_INT >= build.version_codes. KITKAT) {Window win = GetWindow (); Windowmanager.layoutparams winparams = Win.getattributes (); final int bits = WindowManager.LayoutParams.FLAG_ Translucent_status;winparams.flags |= bits;win.setattributes (winparams);} Systemstatusmanager Tintmanager = new Systemstatusmanager (this); tintmanager.setstatusbartintenabled (true); Tintmanager.setstatusbartintresource (0);//status bar no background}}
Friends with this need can download and try.
Resource Address: http://download.csdn.net/detail/aiyuan0204/8485597
Note: This is a new feature of android4.4 and supports only 4.4 or more versions
Here are the following:
Android System Status Bar integration