summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2013-05-28 10:49:18 +0100
committerPaul Gardiner <paulg.artifex@glidos.net>2013-05-28 10:49:18 +0100
commit233716642d4e9b020a4ede41602f6be46bef1ac5 (patch)
tree50df32b84516b30c62bdf8337c28ee1cc639c0e0
parentd6de4d6fe1ec5a6a20f1088dd17fbe0180ea8cd7 (diff)
downloadmupdf-233716642d4e9b020a4ede41602f6be46bef1ac5.tar.xz
Android: disable whole "extras" menu when in reflow mode
-rw-r--r--android/res/layout/buttons.xml4
-rw-r--r--android/res/values/strings.xml1
-rw-r--r--android/src/com/artifex/mupdfdemo/MuPDFActivity.java3
3 files changed, 6 insertions, 2 deletions
diff --git a/android/res/layout/buttons.xml b/android/res/layout/buttons.xml
index 8100f928..98eddc22 100644
--- a/android/res/layout/buttons.xml
+++ b/android/res/layout/buttons.xml
@@ -46,7 +46,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/outlineButton"
- android:contentDescription="@string/search_document"
+ android:contentDescription="@string/toggle_reflow_mode"
android:background="@drawable/button"
android:src="@drawable/ic_reflow" />
@@ -56,7 +56,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/searchButton"
- android:contentDescription="@string/search_document"
+ android:contentDescription="@string/outline_title"
android:background="@drawable/button"
android:src="@drawable/ic_list" />
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
index a3f353d7..65827b23 100644
--- a/android/res/values/strings.xml
+++ b/android/res/values/strings.xml
@@ -52,4 +52,5 @@
<string name="accept">Accept</string>
<string name="copy_text">copy text</string>
<string name="format_currently_not_supported">Format currently not supported</string>
+ <string name="toggle_reflow_mode">Toggle reflow mode</string>
</resources>
diff --git a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
index 31ccc916..ff38b22a 100644
--- a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
+++ b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
@@ -61,6 +61,7 @@ public class MuPDFActivity extends Activity
private ImageButton mSearchButton;
private ImageButton mReflowButton;
private ImageButton mOutlineButton;
+ private ImageButton mMoreButton;
private TextView mAnnotTypeText;
private ImageButton mAnnotButton;
private ViewAnimator mTopBarSwitcher;
@@ -610,6 +611,7 @@ public class MuPDFActivity extends Activity
setButtonEnabled(mSearchButton, !reflow);
if (reflow) setLinkHighlight(false);
setButtonEnabled(mLinkButton, !reflow);
+ setButtonEnabled(mMoreButton, !reflow);
mDocView.refresh(mReflow);
}
@@ -839,6 +841,7 @@ public class MuPDFActivity extends Activity
mSearchFwd = (ImageButton)mButtonsView.findViewById(R.id.searchForward);
mSearchText = (EditText)mButtonsView.findViewById(R.id.searchText);
mLinkButton = (ImageButton)mButtonsView.findViewById(R.id.linkButton);
+ mMoreButton = (ImageButton)mButtonsView.findViewById(R.id.moreButton);
mTopBarSwitcher.setVisibility(View.INVISIBLE);
mPageNumberView.setVisibility(View.INVISIBLE);
mInfoView.setVisibility(View.INVISIBLE);