summaryrefslogtreecommitdiff
path: root/platform/android/example/app/src/main/res
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-03-30 17:50:36 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-03-31 13:00:41 +0200
commitf8b35b0fe546c9f34626155f19dafe16a8f82829 (patch)
treeceb16a90ea3dcdb5a3adad6da58c11fb8e54f522 /platform/android/example/app/src/main/res
parentd68576c3785572c1f5d41f83015b8fe6bbcbe9e8 (diff)
downloadmupdf-f8b35b0fe546c9f34626155f19dafe16a8f82829.tar.xz
android: Add new example viewer.
Thanks to Fred Ross-Perry.
Diffstat (limited to 'platform/android/example/app/src/main/res')
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_any.pngbin0 -> 3167 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_fldr.pngbin0 -> 1523 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_up.pngbin0 -> 2016 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_any.pngbin0 -> 1744 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_fldr.pngbin0 -> 834 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_up.pngbin0 -> 821 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_any.pngbin0 -> 4846 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_fldr.pngbin0 -> 2153 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_up.pngbin0 -> 2420 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_any.pngbin0 -> 9123 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_fldr.pngbin0 -> 4075 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_up.pngbin0 -> 4613 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_any.pngbin0 -> 14341 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_fldr.pngbin0 -> 6189 bytes
-rwxr-xr-xplatform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_up.pngbin0 -> 7804 bytes
-rw-r--r--platform/android/example/app/src/main/res/layout/activity_doc_view.xml67
-rw-r--r--platform/android/example/app/src/main/res/layout/activity_main.xml6
-rw-r--r--platform/android/example/app/src/main/res/layout/choose_doc.xml32
-rw-r--r--platform/android/example/app/src/main/res/layout/picker_entry.xml25
-rw-r--r--platform/android/example/app/src/main/res/mipmap-hdpi/ic_launcher.pngbin0 -> 3418 bytes
-rw-r--r--platform/android/example/app/src/main/res/mipmap-mdpi/ic_launcher.pngbin0 -> 2206 bytes
-rw-r--r--platform/android/example/app/src/main/res/mipmap-xhdpi/ic_launcher.pngbin0 -> 4842 bytes
-rw-r--r--platform/android/example/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngbin0 -> 7718 bytes
-rw-r--r--platform/android/example/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngbin0 -> 10486 bytes
-rw-r--r--platform/android/example/app/src/main/res/values/colors.xml4
-rw-r--r--platform/android/example/app/src/main/res/values/strings.xml10
-rw-r--r--platform/android/example/app/src/main/res/values/styles.xml8
27 files changed, 152 insertions, 0 deletions
diff --git a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_any.png
new file mode 100755
index 00000000..1ec7c5f3
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_any.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_fldr.png
new file mode 100755
index 00000000..8156137e
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_fldr.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_up.png
new file mode 100755
index 00000000..7adeab26
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_up.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_any.png
new file mode 100755
index 00000000..ee4ed481
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_any.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_fldr.png
new file mode 100755
index 00000000..6a1c9862
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_fldr.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_up.png
new file mode 100755
index 00000000..48b7ea04
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_up.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_any.png
new file mode 100755
index 00000000..50e224a4
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_any.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_fldr.png
new file mode 100755
index 00000000..0df4d0c4
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_fldr.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_up.png
new file mode 100755
index 00000000..f089e8d7
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_up.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_any.png
new file mode 100755
index 00000000..9aea910c
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_any.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_fldr.png
new file mode 100755
index 00000000..f0eefc36
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_fldr.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_up.png
new file mode 100755
index 00000000..af79349e
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_up.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_any.png
new file mode 100755
index 00000000..6a653115
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_any.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_fldr.png
new file mode 100755
index 00000000..e06c1b25
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_fldr.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_up.png
new file mode 100755
index 00000000..243c3c65
--- /dev/null
+++ b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_up.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/layout/activity_doc_view.xml b/platform/android/example/app/src/main/res/layout/activity_doc_view.xml
new file mode 100644
index 00000000..05cee21a
--- /dev/null
+++ b/platform/android/example/app/src/main/res/layout/activity_doc_view.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="|&lt;-"
+ android:id="@+id/first_page_button"
+ android:onClick="onFirstPageButton"
+ android:minWidth="60dp" />
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="&lt;"
+ android:id="@+id/previous_page_button"
+ android:onClick="onPreviousPageButton"
+ android:minWidth="60dp" />
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=">"
+ android:id="@+id/next_page_button"
+ android:onClick="onNextPageButton"
+ android:minWidth="60dp" />
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="->|"
+ android:id="@+id/last_page_button"
+ android:onClick="onLastPageButton"
+ android:minWidth="60dp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="Medium Text"
+ android:textColor="@color/white"
+ android:id="@+id/page_text" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/image_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ </ImageView>
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/platform/android/example/app/src/main/res/layout/activity_main.xml b/platform/android/example/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 00000000..24f3d6ba
--- /dev/null
+++ b/platform/android/example/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+</RelativeLayout> \ No newline at end of file
diff --git a/platform/android/example/app/src/main/res/layout/choose_doc.xml b/platform/android/example/app/src/main/res/layout/choose_doc.xml
new file mode 100644
index 00000000..48e63b8c
--- /dev/null
+++ b/platform/android/example/app/src/main/res/layout/choose_doc.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_horizontal"
+ android:id="@+id/device_files_wrapper">
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_horizontal"
+ android:id="@+id/file_list_wrpper">
+
+ <ListView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/fileListView"
+ android:layout_gravity="center_horizontal"
+ android:choiceMode="singleChoice"
+ android:background="#ffffff"/>
+
+ </LinearLayout>
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/platform/android/example/app/src/main/res/layout/picker_entry.xml b/platform/android/example/app/src/main/res/layout/picker_entry.xml
new file mode 100644
index 00000000..98ede7d6
--- /dev/null
+++ b/platform/android/example/app/src/main/res/layout/picker_entry.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="4dp" >
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_alignParentLeft="true" />
+
+ <TextView
+ android:id="@+id/name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_toRightOf="@+id/icon"
+ android:paddingBottom="4dp"
+ android:paddingLeft="10dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+</RelativeLayout>
diff --git a/platform/android/example/app/src/main/res/mipmap-hdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..cde69bcc
--- /dev/null
+++ b/platform/android/example/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/mipmap-mdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..c133a0cb
--- /dev/null
+++ b/platform/android/example/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..bfa42f0e
--- /dev/null
+++ b/platform/android/example/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..324e72cd
--- /dev/null
+++ b/platform/android/example/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..aee44e13
--- /dev/null
+++ b/platform/android/example/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
diff --git a/platform/android/example/app/src/main/res/values/colors.xml b/platform/android/example/app/src/main/res/values/colors.xml
new file mode 100644
index 00000000..b8acf28a
--- /dev/null
+++ b/platform/android/example/app/src/main/res/values/colors.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="white">#FFFFFFFF</color>
+</resources>
diff --git a/platform/android/example/app/src/main/res/values/strings.xml b/platform/android/example/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..3d985824
--- /dev/null
+++ b/platform/android/example/app/src/main/res/values/strings.xml
@@ -0,0 +1,10 @@
+<resources>
+ <string name="app_name">MuPDF Example</string>
+ <string name="ok">OK</string>
+ <string name="version">1.0</string>
+ <string name="no_media_warning">Storage media not present</string>
+ <string name="no_media_hint">Sharing the storage media with a PC can make it inaccessible</string>
+ <string name="dismiss">Dismiss</string>
+ <string name="picker_title_App_Ver_Dir">%1$s %2$s: %3$s</string>
+ <string name="parent_directory">[Up one level]</string>
+</resources>
diff --git a/platform/android/example/app/src/main/res/values/styles.xml b/platform/android/example/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000..3d804574
--- /dev/null
+++ b/platform/android/example/app/src/main/res/values/styles.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <!-- Base application theme. -->
+ <style name="AppBaseTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">
+ </style>
+
+</resources> \ No newline at end of file