I've successfully disabled the notification bar from appearing by using the following code and now I need to upgrade to version 21 of the SDK.
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
}
However, now I'm getting "cannot find symbol TYPE_KEYGUARD". Does anyone have a workaround for this?
Apparently, it's a simple change:
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With