Reputation: 41
I was using this code to hide the system bar
try {
Process process=Runtime.getRuntime().exec(new String[]{"su","-c","service call activity " + 42
+ " s16 com.android.systemui"});
process.waitFor();
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
But since the 5.0 update this code doesn't work anymore.
Upvotes: 0
Views: 298
Reputation: 629
If your device is rooted add this to /system/build.prop
ro.statusbar.alwayshide=true
and reboot device
Upvotes: 1
Reputation: 71
You can use following. Put the system bar in "lights out" mode, the system bar buttons and notifications gets dimmed.
View v = findViewById(R.id.view_id);
v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
Upvotes: 3