diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-03-30 17:49:04 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-03-31 13:00:41 +0200 |
commit | d68576c3785572c1f5d41f83015b8fe6bbcbe9e8 (patch) | |
tree | 431a86edfac640864ba7f406611e8fe9929908cd /platform/android/viewer/res/layout | |
parent | 32cdb2246eeb9e8109a712ec2a5dd2938e30e9b6 (diff) | |
download | mupdf-d68576c3785572c1f5d41f83015b8fe6bbcbe9e8.tar.xz |
Reorganize java and android source.
platform/java and platform/android are reorganized:
platform/java
The new JNI Java classes, mupdf_native.{c,h}, Makefile and Makejar.
platform/java/example
The example desktop viewer classes.
platform/android/viewer
The original demo viewer.
ndk-build is used to build libmupdf_java.so,
making reference to mupdf_native.{c,h} in platform/java.
Diffstat (limited to 'platform/android/viewer/res/layout')
-rw-r--r-- | platform/android/viewer/res/layout/buttons.xml | 408 | ||||
-rw-r--r-- | platform/android/viewer/res/layout/main.xml | 5 | ||||
-rw-r--r-- | platform/android/viewer/res/layout/outline_entry.xml | 27 | ||||
-rw-r--r-- | platform/android/viewer/res/layout/picker_entry.xml | 25 | ||||
-rw-r--r-- | platform/android/viewer/res/layout/print_dialog.xml | 9 | ||||
-rw-r--r-- | platform/android/viewer/res/layout/textentry.xml | 8 |
6 files changed, 482 insertions, 0 deletions
diff --git a/platform/android/viewer/res/layout/buttons.xml b/platform/android/viewer/res/layout/buttons.xml new file mode 100644 index 00000000..6c1620ba --- /dev/null +++ b/platform/android/viewer/res/layout/buttons.xml @@ -0,0 +1,408 @@ +<?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" > + + <ViewAnimator + android:id="@+id/switcher" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_centerHorizontal="true" > + + <RelativeLayout + android:id="@+id/topBar0Main" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/toolbar" > + + <TextView + android:id="@+id/docNameText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/linkButton" + android:layout_alignParentLeft="true" + android:paddingLeft="16dp" + android:singleLine="true" + android:textColor="#FFFFFF" + android:textStyle="bold" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <ImageButton + android:id="@+id/sepsButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:contentDescription="Separations" + android:background="@drawable/button" + android:onClick="OnSepsButtonClick" + android:src="@drawable/ic_sep" /> + + <ImageButton + android:id="@+id/linkButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/reflowButton" + android:contentDescription="@string/toggle_links" + android:background="@drawable/button" + android:src="@drawable/ic_link" /> + + <ImageButton + android:id="@+id/reflowButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/outlineButton" + android:contentDescription="@string/toggle_reflow_mode" + android:background="@drawable/button" + android:src="@drawable/ic_reflow" /> + + <ImageButton + android:id="@+id/outlineButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/searchButton" + android:contentDescription="@string/outline_title" + android:background="@drawable/button" + android:src="@drawable/ic_list" /> + + <ImageButton + android:id="@+id/searchButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/moreButton" + android:contentDescription="@string/search_document" + android:background="@drawable/button" + android:src="@drawable/ic_magnifying_glass" /> + + <ImageButton + android:id="@+id/moreButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:contentDescription="@string/more" + android:background="@drawable/button" + android:onClick="OnMoreButtonClick" + android:src="@drawable/ic_more" /> + + </RelativeLayout> + + <RelativeLayout + android:id="@+id/topBar1Search" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/toolbar" > + + <ImageButton + android:id="@+id/cancelSearch" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:contentDescription="@string/cancel" + android:background="@drawable/button" + android:onClick="OnCancelSearchButtonClick" + android:src="@drawable/ic_cancel" /> + + <EditText + android:id="@+id/searchText" + android:background="@drawable/search" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toRightOf="@+id/cancelSearch" + android:layout_toLeftOf="@+id/searchBack" + android:inputType="text" + android:hint="@string/search" + android:singleLine="true" /> + + <ImageButton + android:id="@+id/searchBack" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/searchForward" + android:contentDescription="@string/search_backwards" + android:background="@drawable/button" + android:src="@drawable/ic_arrow_left" /> + + <ImageButton + android:id="@+id/searchForward" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:contentDescription="@string/search_forwards" + android:background="@drawable/button" + android:src="@drawable/ic_arrow_right" /> + + </RelativeLayout> + + <RelativeLayout + android:id="@+id/topBar2Annot" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/toolbar" > + + <ImageButton + android:id="@+id/cancelAnnotButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:contentDescription="@string/cancel" + android:background="@drawable/button" + android:onClick="OnCancelAnnotButtonClick" + android:src="@drawable/ic_cancel" /> + + <ImageButton + android:id="@+id/highlightButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/underlineButton" + android:contentDescription="@string/highlight" + android:background="@drawable/button" + android:onClick="OnHighlightButtonClick" + android:src="@drawable/ic_highlight" /> + + <ImageButton + android:id="@+id/underlineButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/strikeOutButton" + android:contentDescription="@string/underline" + android:background="@drawable/button" + android:onClick="OnUnderlineButtonClick" + android:src="@drawable/ic_underline" /> + + <ImageButton + android:id="@+id/strikeOutButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/inkButton" + android:contentDescription="@string/strike_out" + android:background="@drawable/button" + android:onClick="OnStrikeOutButtonClick" + android:src="@drawable/ic_strike" /> + + <ImageButton + android:id="@+id/inkButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:contentDescription="@string/ink" + android:background="@drawable/button" + android:onClick="OnInkButtonClick" + android:src="@drawable/ic_pen" /> + + </RelativeLayout> + + <RelativeLayout + android:id="@+id/topBar3Delete" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/toolbar" > + + <ImageButton + android:id="@+id/cancelDeleteButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:contentDescription="@string/cancel" + android:background="@drawable/button" + android:onClick="OnCancelDeleteButtonClick" + android:src="@drawable/ic_cancel" /> + + <TextView + android:id="@+id/deleteLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toRightOf="@+id/cancelDeleteButton" + android:layout_toLeftOf="@+id/deleteButton" + android:gravity="center" + android:singleLine="true" + android:textColor="#FFFFFF" + android:textStyle="bold" + android:text="@string/delete" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <ImageButton + android:id="@+id/deleteButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:contentDescription="@string/delete" + android:background="@drawable/button" + android:onClick="OnDeleteButtonClick" + android:src="@drawable/ic_trash" /> + + </RelativeLayout> + + <RelativeLayout + android:id="@+id/topBar4More" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/toolbar" > + + <ImageButton + android:id="@+id/cancelMoreButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:contentDescription="@string/cancel" + android:background="@drawable/button" + android:onClick="OnCancelMoreButtonClick" + android:src="@drawable/ic_cancel" /> + + <ImageButton + android:id="@+id/proofButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/printButton" + android:contentDescription="@string/proof" + android:background="@drawable/button" + android:onClick="OnProofButtonClick" + android:src="@drawable/ic_proof" /> + + <ImageButton + android:id="@+id/printButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/copyTextButton" + android:contentDescription="@string/print" + android:background="@drawable/button" + android:onClick="OnPrintButtonClick" + android:src="@drawable/ic_print" /> + + <ImageButton + android:id="@+id/copyTextButton" + android:layout_width="wrap_content" + 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" + android:src="@drawable/ic_clipboard" /> + + <ImageButton + android:id="@+id/editAnnotButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:contentDescription="@string/edit_annotations" + android:background="@drawable/button" + android:onClick="OnEditAnnotButtonClick" + android:src="@drawable/ic_annotation" /> + </RelativeLayout> + + <RelativeLayout + android:id="@+id/topBar5Accept" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/toolbar" > + + <ImageButton + android:id="@+id/cancelAcceptButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:contentDescription="@string/cancel" + android:background="@drawable/button" + android:onClick="OnCancelAcceptButtonClick" + android:src="@drawable/ic_cancel" /> + + <TextView + android:id="@+id/annotType" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toRightOf="@+id/cancelAcceptButton" + android:layout_toLeftOf="@+id/acceptButton" + android:gravity="center" + android:singleLine="true" + android:textColor="#FFFFFF" + android:textStyle="bold" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <ImageButton + android:id="@+id/acceptButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:contentDescription="@string/accept" + android:background="@drawable/button" + android:onClick="OnAcceptButtonClick" + android:src="@drawable/ic_check" /> + </RelativeLayout> + </ViewAnimator> + + <RelativeLayout + android:id="@+id/lowerButtons" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" > + + <SeekBar + android:id="@+id/pageSlider" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" + android:layout_margin="0dp" + android:thumb="@drawable/seek_thumb" + android:progressDrawable="@drawable/seek_progress" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:paddingTop="12dp" + android:paddingBottom="8dp" + android:background="@color/toolbar" + /> + + <TextView + android:id="@+id/pageNumber" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_above="@+id/pageSlider" + android:layout_centerHorizontal="true" + android:layout_marginBottom="16dp" + android:background="@drawable/page_num" + android:textColor="#FFFFFF" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + </RelativeLayout> + + <TextView + android:id="@+id/info" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_above="@+id/pageSlider" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:background="@drawable/page_num" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="#FFFFFF" /> + +</RelativeLayout> diff --git a/platform/android/viewer/res/layout/main.xml b/platform/android/viewer/res/layout/main.xml new file mode 100644 index 00000000..50b4746b --- /dev/null +++ b/platform/android/viewer/res/layout/main.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" /> diff --git a/platform/android/viewer/res/layout/outline_entry.xml b/platform/android/viewer/res/layout/outline_entry.xml new file mode 100644 index 00000000..ea7912e4 --- /dev/null +++ b/platform/android/viewer/res/layout/outline_entry.xml @@ -0,0 +1,27 @@ +<?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" > + + <TextView + android:id="@+id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_toLeftOf="@+id/page" + android:singleLine="true" + android:layout_centerVertical="true" + android:paddingLeft="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <TextView + android:id="@+id/page" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBaseline="@+id/title" + android:layout_alignBottom="@+id/title" + android:layout_alignParentRight="true" + android:paddingRight="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" /> + +</RelativeLayout> diff --git a/platform/android/viewer/res/layout/picker_entry.xml b/platform/android/viewer/res/layout/picker_entry.xml new file mode 100644 index 00000000..673a4724 --- /dev/null +++ b/platform/android/viewer/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="8dp" > + + <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="8dp" + android:paddingLeft="12dp" + android:paddingRight="12dp" + android:paddingTop="8dp" + android:textAppearance="?android:attr/textAppearanceLarge" /> + +</RelativeLayout> diff --git a/platform/android/viewer/res/layout/print_dialog.xml b/platform/android/viewer/res/layout/print_dialog.xml new file mode 100644 index 00000000..1d54d22f --- /dev/null +++ b/platform/android/viewer/res/layout/print_dialog.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + <WebView android:id="@+id/webview" + android:layout_width="fill_parent" + android:layout_height="fill_parent"/> +</RelativeLayout> diff --git a/platform/android/viewer/res/layout/textentry.xml b/platform/android/viewer/res/layout/textentry.xml new file mode 100644 index 00000000..08823df8 --- /dev/null +++ b/platform/android/viewer/res/layout/textentry.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<EditText xmlns:android="http://schemas.android.com/apk/res/android" + android:singleLine="false" + android:minLines="3" + android:inputType="textMultiLine" + android:layout_width="match_parent" + android:layout_height="wrap_content" > +</EditText> |