From 2e3fcbaf6b0c71e178a681476dc1b997b3bd1bbe Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Fri, 5 Apr 2013 14:43:29 +0100 Subject: Android: handle features not supported other than for PDF files --- android/res/layout/buttons.xml | 1 + android/res/values/strings.xml | 1 + android/src/com/artifex/mupdfdemo/MuPDFActivity.java | 5 +++++ 3 files changed, 7 insertions(+) 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 @@ More Accept copy text + Format currently not supported 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; -- cgit v1.2.3