The example in this article describes the way to hide the bottom taskbar of Android4.0 flat panel development. Share to everyone for your reference, specific as follows:
Copy Code code as follows:
GetWindow (). Getdecorview (). setsystemuivisibility (view.system_ui_flag_hide_navigation);//Hide Bottom taskbar code
The top is validated
Baidu came in below
Showbar display taskbar
Closebar Hide Task bar
Prerequisite: Root Permission Required
public static void Showbar () {try {Process proc = runtime.getruntime (). EXEC ( New string[] {"AM", "StartService", "-N", "com.android.systemui/."
Systemuiservice "});
Proc.waitfor ();
catch (Exception e) {e.printstacktrace (); The public static void Closebar (context context) {try {//Require root permission build.version_codes VC = new Buil
D.version_codes ();
Build.version VR = new build.version ();
String procid = "79"; if (VR. Sdk_int >= VC. Ice_cream_sandwich) {procid = "n";//ICS and newer}//requires root permission Process proc = Runtime.getrunti Me (). EXEC (new string[] {"Su", "C", "Service call activity" + ProcID + "S16 Co M.android.systemui "});
was Proc.waitfor ();
The catch (Exception ex) {Toast.maketext (context, Ex.getmessage (), Toast.length_long). Show (); }
}
1.ActionBar:
<activity android:name= "Demo"
android:label= "@string/app_name"
android:theme= "@android: style/ Theme.NoTitleBar.Fullscreen ">
<intent-filter>
<action android:name=" Android.intent.action.MAIN "/>
<category android:name= android.intent.category.LAUNCHER"/>
< /intent-filter>
</activity>
2. TitleBar
Hide:
Copy Code code as follows:
Requestwindowfeature (Window.feature_no_title);
Or
Copy Code code as follows:
Android:theme= "@android: Style/theme.black.notitlebar
Show:
Copy Code code as follows:
Requestwindowfeature (Window.feature_custom_title);
3.NotificationBar, StatusBar, Systembar
Dim words Can:
GetWindow (). Getdecorview (). Setsystemuivisibility (
view.system_ui_flag_low_profile);
Hidden words can (not, haha):
GetWindow (). Getdecorview (). Setsystemuivisibility (
view.system_ui_flag_hide_navigation);
How do you play that? Use ruthless strokes, haha:
Command-line method:
Kill directly with process number, do not add service that shell, a systembar will start.
# Kill Com.android.systemui
# Service call activity-S16 Com.android.systemui
If you want to start Systembar:
Copy Code code as follows:
# AM Startservice-n com.android.systemui/. Systemuiservice
Code mode:
to root.
Process proc = Runtime.getruntime (). EXEC (new string[]{"Su", "-C", "Service call activity,"
s16 com.android.systemui "});
Proc.waitfor ();
Process proc = Runtime.getruntime (). EXEC (new string[]{"AM", "StartService", "-N", "com.android.systemui/." Systemuiservice "});
Proc.waitfor ();
I hope this article will help you with the Android program.