mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 02:39:23 +02:00
always show status bar in menu mode (option has been removed)
This commit is contained in:
parent
b41a8d4b7c
commit
908e6c1ccc
3 changed files with 5 additions and 30 deletions
|
@ -154,8 +154,7 @@ public final class FBReader extends ZLAndroidActivity {
|
||||||
@Override
|
@Override
|
||||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||||
final ZLAndroidLibrary zlibrary = (ZLAndroidLibrary)ZLibrary.Instance();
|
final ZLAndroidLibrary zlibrary = (ZLAndroidLibrary)ZLibrary.Instance();
|
||||||
if (!zlibrary.ShowStatusBarOption.getValue() &&
|
if (!zlibrary.ShowStatusBarOption.getValue()) {
|
||||||
zlibrary.ShowStatusBarWhenMenuIsActiveOption.getValue()) {
|
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||||
}
|
}
|
||||||
return super.onPrepareOptionsMenu(menu);
|
return super.onPrepareOptionsMenu(menu);
|
||||||
|
@ -165,8 +164,7 @@ public final class FBReader extends ZLAndroidActivity {
|
||||||
public void onOptionsMenuClosed(Menu menu) {
|
public void onOptionsMenuClosed(Menu menu) {
|
||||||
super.onOptionsMenuClosed(menu);
|
super.onOptionsMenuClosed(menu);
|
||||||
final ZLAndroidLibrary zlibrary = (ZLAndroidLibrary)ZLibrary.Instance();
|
final ZLAndroidLibrary zlibrary = (ZLAndroidLibrary)ZLibrary.Instance();
|
||||||
if (!zlibrary.ShowStatusBarOption.getValue() &&
|
if (!zlibrary.ShowStatusBarOption.getValue()) {
|
||||||
zlibrary.ShowStatusBarWhenMenuIsActiveOption.getValue()) {
|
|
||||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,8 +172,7 @@ public final class FBReader extends ZLAndroidActivity {
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
final ZLAndroidLibrary zlibrary = (ZLAndroidLibrary)ZLibrary.Instance();
|
final ZLAndroidLibrary zlibrary = (ZLAndroidLibrary)ZLibrary.Instance();
|
||||||
if (!zlibrary.ShowStatusBarOption.getValue() &&
|
if (!zlibrary.ShowStatusBarOption.getValue()) {
|
||||||
zlibrary.ShowStatusBarWhenMenuIsActiveOption.getValue()) {
|
|
||||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
|
|
|
@ -56,30 +56,12 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
||||||
}
|
}
|
||||||
directoriesScreen.addOption(Paths.WallpapersDirectoryOption(), "wallpapers");
|
directoriesScreen.addOption(Paths.WallpapersDirectoryOption(), "wallpapers");
|
||||||
|
|
||||||
final ZLPreferenceSet statusBarPreferences = new ZLPreferenceSet();
|
|
||||||
final Screen appearanceScreen = createPreferenceScreen("appearance");
|
final Screen appearanceScreen = createPreferenceScreen("appearance");
|
||||||
appearanceScreen.addPreference(new ZLStringChoicePreference(
|
appearanceScreen.addPreference(new ZLStringChoicePreference(
|
||||||
this, appearanceScreen.Resource, "screenOrientation",
|
this, appearanceScreen.Resource, "screenOrientation",
|
||||||
androidLibrary.OrientationOption, androidLibrary.allOrientations()
|
androidLibrary.OrientationOption, androidLibrary.allOrientations()
|
||||||
));
|
));
|
||||||
appearanceScreen.addPreference(
|
appearanceScreen.addOption(androidLibrary.ShowStatusBarOption, "showStatusBar");
|
||||||
new ZLBooleanPreference(
|
|
||||||
this, androidLibrary.ShowStatusBarOption, appearanceScreen.Resource, "showStatusBar"
|
|
||||||
) {
|
|
||||||
@Override
|
|
||||||
public void onClick() {
|
|
||||||
super.onClick();
|
|
||||||
statusBarPreferences.setEnabled(!isChecked());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
statusBarPreferences.add(
|
|
||||||
appearanceScreen.addOption(
|
|
||||||
androidLibrary.ShowStatusBarWhenMenuIsActiveOption,
|
|
||||||
"showStatusBarWhenMenuIsActive"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
statusBarPreferences.setEnabled(!androidLibrary.ShowStatusBarOption.getValue());
|
|
||||||
appearanceScreen.addOption(androidLibrary.DisableButtonLightsOption, "disableButtonLights");
|
appearanceScreen.addOption(androidLibrary.DisableButtonLightsOption, "disableButtonLights");
|
||||||
|
|
||||||
final Screen textScreen = createPreferenceScreen("text");
|
final Screen textScreen = createPreferenceScreen("text");
|
||||||
|
@ -112,10 +94,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
||||||
this, textScreen.Resource, "alignment",
|
this, textScreen.Resource, "alignment",
|
||||||
baseStyle.AlignmentOption, alignments
|
baseStyle.AlignmentOption, alignments
|
||||||
));
|
));
|
||||||
textScreen.addPreference(new ZLBooleanPreference(
|
textScreen.addOption(baseStyle.AutoHyphenationOption, "autoHyphenations");
|
||||||
this, baseStyle.AutoHyphenationOption,
|
|
||||||
textScreen.Resource, "autoHyphenations"
|
|
||||||
));
|
|
||||||
|
|
||||||
final Screen moreStylesScreen = textScreen.createPreferenceScreen("more");
|
final Screen moreStylesScreen = textScreen.createPreferenceScreen("more");
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,6 @@ import org.geometerplus.zlibrary.ui.android.view.ZLAndroidWidget;
|
||||||
|
|
||||||
public final class ZLAndroidLibrary extends ZLibrary {
|
public final class ZLAndroidLibrary extends ZLibrary {
|
||||||
public final ZLBooleanOption ShowStatusBarOption = new ZLBooleanOption("LookNFeel", "ShowStatusBar", hasNoHardwareMenuButton());
|
public final ZLBooleanOption ShowStatusBarOption = new ZLBooleanOption("LookNFeel", "ShowStatusBar", hasNoHardwareMenuButton());
|
||||||
public final ZLBooleanOption ShowStatusBarWhenMenuIsActiveOption = new ZLBooleanOption("LookNFeel", "ShowStatusBarWithMenu", true);
|
|
||||||
public final ZLIntegerRangeOption BatteryLevelToTurnScreenOffOption = new ZLIntegerRangeOption("LookNFeel", "BatteryLevelToTurnScreenOff", 0, 100, 50);
|
public final ZLIntegerRangeOption BatteryLevelToTurnScreenOffOption = new ZLIntegerRangeOption("LookNFeel", "BatteryLevelToTurnScreenOff", 0, 100, 50);
|
||||||
public final ZLBooleanOption DontTurnScreenOffDuringChargingOption = new ZLBooleanOption("LookNFeel", "DontTurnScreenOffDuringCharging", true);
|
public final ZLBooleanOption DontTurnScreenOffDuringChargingOption = new ZLBooleanOption("LookNFeel", "DontTurnScreenOffDuringCharging", true);
|
||||||
public final ZLIntegerRangeOption ScreenBrightnessLevelOption = new ZLIntegerRangeOption("LookNFeel", "ScreenBrightnessLevel", 0, 100, 0);
|
public final ZLIntegerRangeOption ScreenBrightnessLevelOption = new ZLIntegerRangeOption("LookNFeel", "ScreenBrightnessLevel", 0, 100, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue