summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-02-21 15:49:00 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-02-21 17:38:23 +0100
commit71b7e5af9c95d42428336ec41deb64f8e74f5520 (patch)
treeb2f7bc4b7209892b77bedcd5535c345f43a7c68c /android
parent84e4170aff12e0e6dbaec1b0ae5a98372a0d091c (diff)
downloadmupdf-71b7e5af9c95d42428336ec41deb64f8e74f5520.tar.xz
Add new Android button icons and tweak the layouts.
Diffstat (limited to 'android')
-rw-r--r--android/Icons.txt2
-rw-r--r--android/res/drawable-hdpi/btn_star_big_off.pngbin2208 -> 0 bytes
-rw-r--r--android/res/drawable-hdpi/ic_btn_search.pngbin2365 -> 0 bytes
-rw-r--r--android/res/drawable-hdpi/ic_media_next.pngbin1675 -> 0 bytes
-rw-r--r--android/res/drawable-hdpi/ic_media_previous.pngbin1713 -> 0 bytes
-rw-r--r--android/res/drawable-ldpi/ic_arrow_left.pngbin0 -> 236 bytes
-rw-r--r--android/res/drawable-ldpi/ic_arrow_right.pngbin0 -> 232 bytes
-rw-r--r--android/res/drawable-ldpi/ic_cancel.pngbin0 -> 230 bytes
-rw-r--r--android/res/drawable-ldpi/ic_list.pngbin0 -> 2821 bytes
-rw-r--r--android/res/drawable-ldpi/ic_magnifying_glass.pngbin0 -> 354 bytes
-rw-r--r--android/res/drawable-mdpi/btn_star_big_off.pngbin1316 -> 0 bytes
-rw-r--r--android/res/drawable-mdpi/ic_arrow_left.pngbin0 -> 254 bytes
-rw-r--r--android/res/drawable-mdpi/ic_arrow_right.pngbin0 -> 330 bytes
-rw-r--r--android/res/drawable-mdpi/ic_btn_search.pngbin1390 -> 0 bytes
-rw-r--r--android/res/drawable-mdpi/ic_cancel.pngbin0 -> 253 bytes
-rw-r--r--android/res/drawable-mdpi/ic_list.pngbin0 -> 2831 bytes
-rw-r--r--android/res/drawable-mdpi/ic_magnifying_glass.pngbin0 -> 426 bytes
-rw-r--r--android/res/drawable-mdpi/ic_media_next.pngbin1309 -> 0 bytes
-rw-r--r--android/res/drawable-mdpi/ic_media_previous.pngbin1295 -> 0 bytes
-rw-r--r--android/res/drawable/slider.xml11
-rw-r--r--android/res/layout/buttons.xml32
-rw-r--r--android/res/layout/outline_entry.xml4
-rw-r--r--android/src/com/artifex/mupdf/MuPDFActivity.java4
23 files changed, 32 insertions, 21 deletions
diff --git a/android/Icons.txt b/android/Icons.txt
new file mode 100644
index 00000000..9d0082bf
--- /dev/null
+++ b/android/Icons.txt
@@ -0,0 +1,2 @@
+The icons are from http://somerandomdude.com/work/iconic/
+They are covered by the CC-BY-SA license: http://creativecommons.org/licenses/by-sa/3.0/us/
diff --git a/android/res/drawable-hdpi/btn_star_big_off.png b/android/res/drawable-hdpi/btn_star_big_off.png
deleted file mode 100644
index 4be0f5df..00000000
--- a/android/res/drawable-hdpi/btn_star_big_off.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-hdpi/ic_btn_search.png b/android/res/drawable-hdpi/ic_btn_search.png
deleted file mode 100644
index 0a91eabc..00000000
--- a/android/res/drawable-hdpi/ic_btn_search.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-hdpi/ic_media_next.png b/android/res/drawable-hdpi/ic_media_next.png
deleted file mode 100644
index 2552f4ed..00000000
--- a/android/res/drawable-hdpi/ic_media_next.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-hdpi/ic_media_previous.png b/android/res/drawable-hdpi/ic_media_previous.png
deleted file mode 100644
index 05eba718..00000000
--- a/android/res/drawable-hdpi/ic_media_previous.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-ldpi/ic_arrow_left.png b/android/res/drawable-ldpi/ic_arrow_left.png
new file mode 100644
index 00000000..6171e1bb
--- /dev/null
+++ b/android/res/drawable-ldpi/ic_arrow_left.png
Binary files differ
diff --git a/android/res/drawable-ldpi/ic_arrow_right.png b/android/res/drawable-ldpi/ic_arrow_right.png
new file mode 100644
index 00000000..21db8327
--- /dev/null
+++ b/android/res/drawable-ldpi/ic_arrow_right.png
Binary files differ
diff --git a/android/res/drawable-ldpi/ic_cancel.png b/android/res/drawable-ldpi/ic_cancel.png
new file mode 100644
index 00000000..369e7a54
--- /dev/null
+++ b/android/res/drawable-ldpi/ic_cancel.png
Binary files differ
diff --git a/android/res/drawable-ldpi/ic_list.png b/android/res/drawable-ldpi/ic_list.png
new file mode 100644
index 00000000..c7855647
--- /dev/null
+++ b/android/res/drawable-ldpi/ic_list.png
Binary files differ
diff --git a/android/res/drawable-ldpi/ic_magnifying_glass.png b/android/res/drawable-ldpi/ic_magnifying_glass.png
new file mode 100644
index 00000000..54c747ae
--- /dev/null
+++ b/android/res/drawable-ldpi/ic_magnifying_glass.png
Binary files differ
diff --git a/android/res/drawable-mdpi/btn_star_big_off.png b/android/res/drawable-mdpi/btn_star_big_off.png
deleted file mode 100644
index 7e9342b5..00000000
--- a/android/res/drawable-mdpi/btn_star_big_off.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_arrow_left.png b/android/res/drawable-mdpi/ic_arrow_left.png
new file mode 100644
index 00000000..460e9958
--- /dev/null
+++ b/android/res/drawable-mdpi/ic_arrow_left.png
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_arrow_right.png b/android/res/drawable-mdpi/ic_arrow_right.png
new file mode 100644
index 00000000..b52680d0
--- /dev/null
+++ b/android/res/drawable-mdpi/ic_arrow_right.png
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_btn_search.png b/android/res/drawable-mdpi/ic_btn_search.png
deleted file mode 100644
index 3f8913e2..00000000
--- a/android/res/drawable-mdpi/ic_btn_search.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_cancel.png b/android/res/drawable-mdpi/ic_cancel.png
new file mode 100644
index 00000000..a18beccf
--- /dev/null
+++ b/android/res/drawable-mdpi/ic_cancel.png
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_list.png b/android/res/drawable-mdpi/ic_list.png
new file mode 100644
index 00000000..8d081002
--- /dev/null
+++ b/android/res/drawable-mdpi/ic_list.png
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_magnifying_glass.png b/android/res/drawable-mdpi/ic_magnifying_glass.png
new file mode 100644
index 00000000..37774428
--- /dev/null
+++ b/android/res/drawable-mdpi/ic_magnifying_glass.png
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_media_next.png b/android/res/drawable-mdpi/ic_media_next.png
deleted file mode 100644
index 84f38e8f..00000000
--- a/android/res/drawable-mdpi/ic_media_next.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_media_previous.png b/android/res/drawable-mdpi/ic_media_previous.png
deleted file mode 100644
index 1bba5441..00000000
--- a/android/res/drawable-mdpi/ic_media_previous.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable/slider.xml b/android/res/drawable/slider.xml
index dfd65694..acac1d80 100644
--- a/android/res/drawable/slider.xml
+++ b/android/res/drawable/slider.xml
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <corners android:radius="5dp" />
- <padding android:left="10dp"
- android:right="10dp"
- android:top="10dp"
- android:bottom="10dp" />
+ <padding android:left="15dp"
+ android:right="15dp"
+ android:top="5dp"
+ android:bottom="5dp" />
<solid android:color="#CC444444" />
-</shape> \ No newline at end of file
+</shape>
diff --git a/android/res/layout/buttons.xml b/android/res/layout/buttons.xml
index 82cfc94d..b4d44284 100644
--- a/android/res/layout/buttons.xml
+++ b/android/res/layout/buttons.xml
@@ -9,7 +9,7 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
- android:layout_margin="10dp"
+ android:layout_margin="0dp"
android:background="@drawable/slider" />
<ViewSwitcher
@@ -24,11 +24,11 @@
android:id="@+id/topBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="#CC444444"
android:paddingBottom="0dp"
- android:paddingLeft="5dp"
- android:paddingRight="5dp"
- android:paddingTop="0dp" >
+ android:paddingLeft="0dp"
+ android:paddingRight="0dp"
+ android:paddingTop="0dp"
+ android:background="#CC444444" >
<ImageButton
android:id="@+id/searchButton"
@@ -37,7 +37,7 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:contentDescription="@string/search_document"
- android:src="@drawable/ic_btn_search" />
+ android:src="@drawable/ic_magnifying_glass" />
<ImageButton
android:id="@+id/outlineButton"
@@ -46,7 +46,7 @@
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/searchButton"
android:contentDescription="@string/search_document"
- android:src="@drawable/btn_star_big_off" />
+ android:src="@drawable/ic_list" />
<TextView
android:id="@+id/docNameText"
@@ -55,6 +55,7 @@
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/outlineButton"
+ android:paddingLeft="15dp"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
@@ -63,24 +64,31 @@
android:id="@+id/topBar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingBottom="0dp"
+ android:paddingLeft="0dp"
+ android:paddingRight="0dp"
+ android:paddingTop="0dp"
android:background="#CC444444" >
- <Button
+ <ImageButton
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
- android:text="@string/cancel" />
+ android:contentDescription="@string/cancel"
+ android:src="@drawable/ic_cancel" />
<EditText
android:id="@+id/searchText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
+ android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/searchBack"
android:layout_toRightOf="@+id/cancel"
android:inputType="text"
+ android:hint="Search"
android:singleLine="true" />
<ImageButton
@@ -90,7 +98,7 @@
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/searchForward"
android:contentDescription="@string/search_backwards"
- android:src="@drawable/ic_media_previous" />
+ android:src="@drawable/ic_arrow_left" />
<ImageButton
android:id="@+id/searchForward"
@@ -99,7 +107,7 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:contentDescription="@string/search_forwards"
- android:src="@drawable/ic_media_next" />
+ android:src="@drawable/ic_arrow_right" />
</RelativeLayout>
</ViewSwitcher>
@@ -113,4 +121,4 @@
android:background="@drawable/page_num"
android:textAppearance="?android:attr/textAppearanceMedium" />
-</RelativeLayout> \ No newline at end of file
+</RelativeLayout>
diff --git a/android/res/layout/outline_entry.xml b/android/res/layout/outline_entry.xml
index 5a617e99..3983d766 100644
--- a/android/res/layout/outline_entry.xml
+++ b/android/res/layout/outline_entry.xml
@@ -11,6 +11,7 @@
android:layout_toLeftOf="@+id/page"
android:singleLine="true"
android:layout_centerVertical="true"
+ android:paddingLeft="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
@@ -20,6 +21,7 @@
android:layout_alignBaseline="@+id/title"
android:layout_alignBottom="@+id/title"
android:layout_alignParentRight="true"
+ android:paddingRight="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
-</RelativeLayout> \ No newline at end of file
+</RelativeLayout>
diff --git a/android/src/com/artifex/mupdf/MuPDFActivity.java b/android/src/com/artifex/mupdf/MuPDFActivity.java
index 69cfa271..50e3a9ea 100644
--- a/android/src/com/artifex/mupdf/MuPDFActivity.java
+++ b/android/src/com/artifex/mupdf/MuPDFActivity.java
@@ -51,7 +51,7 @@ public class MuPDFActivity extends Activity
private SeekBar mPageSlider;
private TextView mPageNumberView;
private ImageButton mSearchButton;
- private Button mCancelButton;
+ private ImageButton mCancelButton;
private ImageButton mOutlineButton;
private ViewSwitcher mTopBarSwitcher;
private boolean mTopBarIsSearch;
@@ -462,7 +462,7 @@ public class MuPDFActivity extends Activity
mPageSlider = (SeekBar)mButtonsView.findViewById(R.id.pageSlider);
mPageNumberView = (TextView)mButtonsView.findViewById(R.id.pageNumber);
mSearchButton = (ImageButton)mButtonsView.findViewById(R.id.searchButton);
- mCancelButton = (Button)mButtonsView.findViewById(R.id.cancel);
+ mCancelButton = (ImageButton)mButtonsView.findViewById(R.id.cancel);
mOutlineButton = (ImageButton)mButtonsView.findViewById(R.id.outlineButton);
mTopBarSwitcher = (ViewSwitcher)mButtonsView.findViewById(R.id.switcher);
mSearchBack = (ImageButton)mButtonsView.findViewById(R.id.searchBack);