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

kindle menu issue

This commit is contained in:
Nikolay Pultsin 2012-01-07 08:18:31 +00:00
parent 80b5ada0e5
commit 4cc11466fa
3 changed files with 14 additions and 2 deletions

View file

@ -13,6 +13,7 @@
* Quick access to book info in Android 3/4 (by tap on book title in action bar) * Quick access to book info in Android 3/4 (by tap on book title in action bar)
* TOC item name is shown in navigation window * TOC item name is shown in navigation window
* Versions for Honeycomb (Android 3.0) and Ice Cream Sandwich (Android 4.0) are megred into the same APK * Versions for Honeycomb (Android 3.0) and Ice Cream Sandwich (Android 4.0) are megred into the same APK
* Kindle menu issue has been fixed
===== 1.2.6 (Dec 19, 2011) ===== ===== 1.2.6 (Dec 19, 2011) =====
* Android 3.*, 4.*: bottom buttons are hidden during book reading * Android 3.*, 4.*: bottom buttons are hidden during book reading

View file

@ -154,7 +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.isKindleFire() && !zlibrary.ShowStatusBarOption.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);
@ -164,7 +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.isKindleFire() && !zlibrary.ShowStatusBarOption.getValue()) {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
} }
} }

View file

@ -56,6 +56,17 @@ public final class ZLAndroidLibrary extends ZLibrary {
"PD_Novel".equals(Build.MODEL); "PD_Novel".equals(Build.MODEL);
} }
private Boolean myIsKindleFire = null;
public boolean isKindleFire() {
if (myIsKindleFire == null) {
final String KINDLE_MODEL_REGEXP = ".*kindle(\\s+)fire.*";
myIsKindleFire =
Build.MODEL != null &&
Build.MODEL.toLowerCase().matches(KINDLE_MODEL_REGEXP);
}
return myIsKindleFire;
}
private ZLAndroidActivity myActivity; private ZLAndroidActivity myActivity;
private final Application myApplication; private final Application myApplication;
private ZLAndroidWidget myWidget; private ZLAndroidWidget myWidget;