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:
parent
80b5ada0e5
commit
4cc11466fa
3 changed files with 14 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
|||
* 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
|
||||
* 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) =====
|
||||
* Android 3.*, 4.*: bottom buttons are hidden during book reading
|
||||
|
|
|
@ -154,7 +154,7 @@ public final class FBReader extends ZLAndroidActivity {
|
|||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
final ZLAndroidLibrary zlibrary = (ZLAndroidLibrary)ZLibrary.Instance();
|
||||
if (!zlibrary.ShowStatusBarOption.getValue()) {
|
||||
if (!zlibrary.isKindleFire() && !zlibrary.ShowStatusBarOption.getValue()) {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
}
|
||||
return super.onPrepareOptionsMenu(menu);
|
||||
|
@ -164,7 +164,7 @@ public final class FBReader extends ZLAndroidActivity {
|
|||
public void onOptionsMenuClosed(Menu menu) {
|
||||
super.onOptionsMenuClosed(menu);
|
||||
final ZLAndroidLibrary zlibrary = (ZLAndroidLibrary)ZLibrary.Instance();
|
||||
if (!zlibrary.ShowStatusBarOption.getValue()) {
|
||||
if (!zlibrary.isKindleFire() && !zlibrary.ShowStatusBarOption.getValue()) {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,17 @@ public final class ZLAndroidLibrary extends ZLibrary {
|
|||
"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 final Application myApplication;
|
||||
private ZLAndroidWidget myWidget;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue