1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 10:49:24 +02:00

better 'status-bar-when-menu-became-active' implementation by Steffen

This commit is contained in:
Nikolay Pultsin 2011-02-09 00:11:45 +00:00
parent 985bde0dce
commit 79c36fe6c9
2 changed files with 3 additions and 9 deletions

View file

@ -109,10 +109,7 @@ public final class FBReader extends ZLAndroidActivity {
final ZLAndroidApplication application = ZLAndroidApplication.Instance();
if (!application.ShowStatusBarOption.getValue() &&
application.ShowStatusBarWhenMenuIsActiveOption.getValue()) {
final Window window = getWindow();
final WindowManager.LayoutParams attrs = window.getAttributes();
attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN;
window.setAttributes(attrs);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
}
return super.onPrepareOptionsMenu(menu);
}
@ -123,10 +120,7 @@ public final class FBReader extends ZLAndroidActivity {
final ZLAndroidApplication application = ZLAndroidApplication.Instance();
if (!application.ShowStatusBarOption.getValue() &&
application.ShowStatusBarWhenMenuIsActiveOption.getValue()) {
final Window window = getWindow();
final WindowManager.LayoutParams attrs = window.getAttributes();
attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
window.setAttributes(attrs);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
}
}