Hidden Notification Bar Reappearing After Screen Lock And Unlock
I hid my notification bar for my activity by changing the theme to Theme.NoTitlebar.FullScreen and then changed it in my manifest too. I successfully hid the notification bar. Bu
Solution 1:
I have same problem when I use TabHost. Here are a workaround for this problem:
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
getWindow().getDecorView().postDelayed(new Runnable() {
@Override
public void run() {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}, 100);
}
}
This is drawn first with the notification bar and redrawn after the ms.
The best solution, if you don't use TabHost.
Post a Comment for "Hidden Notification Bar Reappearing After Screen Lock And Unlock"