From 233716642d4e9b020a4ede41602f6be46bef1ac5 Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Tue, 28 May 2013 10:49:18 +0100 Subject: Android: disable whole "extras" menu when in reflow mode --- android/res/layout/buttons.xml | 4 ++-- android/res/values/strings.xml | 1 + android/src/com/artifex/mupdfdemo/MuPDFActivity.java | 3 +++ 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 @@ Accept copy text Format currently not supported + Toggle reflow mode 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); -- cgit v1.2.3