summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2013-04-05 14:43:29 +0100
committerRobin Watts <robin.watts@artifex.com>2013-04-09 15:47:52 +0100
commit2e3fcbaf6b0c71e178a681476dc1b997b3bd1bbe (patch)
tree6bd48865b1ba6b4a6ee3173523526dc3da06f2de
parent64727a78d65ad550e0a2d5c8d614c503929046bd (diff)
downloadmupdf-2e3fcbaf6b0c71e178a681476dc1b997b3bd1bbe.tar.xz
Android: handle features not supported other than for PDF files
-rw-r--r--android/res/layout/buttons.xml1
-rw-r--r--android/res/values/strings.xml1
-rw-r--r--android/src/com/artifex/mupdfdemo/MuPDFActivity.java5
3 files changed, 7 insertions, 0 deletions
diff --git a/android/res/layout/buttons.xml b/android/res/layout/buttons.xml
index 8759d3c7..74657d42 100644
--- a/android/res/layout/buttons.xml
+++ b/android/res/layout/buttons.xml
@@ -261,6 +261,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/editAnnotButton"
+ android:layout_alignWithParentIfMissing="true"
android:contentDescription="@string/copy_text_to_the_clipboard"
android:background="@drawable/button"
android:onClick="OnCopyTextButtonClick"
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
index d47b868d..6f41caec 100644
--- a/android/res/values/strings.xml
+++ b/android/res/values/strings.xml
@@ -54,4 +54,5 @@
<string name="more">More</string>
<string name="accept">Accept</string>
<string name="copy_text">copy text</string>
+ <string name="format_currently_not_supported">Format currently not supported</string>
</resources>
diff --git a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
index 15b16443..7cca742b 100644
--- a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
+++ b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
@@ -792,6 +792,11 @@ public class MuPDFActivity extends Activity
}
private void printDoc() {
+ if (!core.fileFormat().startsWith("PDF")) {
+ showInfo(getString(R.string.format_currently_not_supported));
+ return;
+ }
+
Intent myIntent = getIntent();
Uri docUri = myIntent != null ? myIntent.getData() : null;