diff options
Diffstat (limited to 'sample/src/main/res')
32 files changed, 553 insertions, 0 deletions
diff --git a/sample/src/main/res/drawable-nodpi/button_standout_inactive.xml b/sample/src/main/res/drawable-nodpi/button_standout_inactive.xml new file mode 100644 index 0000000..dfcefb4 --- /dev/null +++ b/sample/src/main/res/drawable-nodpi/button_standout_inactive.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> + <solid android:color="#333333" /> +</shape> diff --git a/sample/src/main/res/drawable-nodpi/button_standout_pressed.xml b/sample/src/main/res/drawable-nodpi/button_standout_pressed.xml new file mode 100644 index 0000000..857646a --- /dev/null +++ b/sample/src/main/res/drawable-nodpi/button_standout_pressed.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> + <solid android:color="#0099CC" /> +</shape> diff --git a/sample/src/main/res/drawable-nodpi/button_transparent_pressed.xml b/sample/src/main/res/drawable-nodpi/button_transparent_pressed.xml new file mode 100644 index 0000000..e2ed965 --- /dev/null +++ b/sample/src/main/res/drawable-nodpi/button_transparent_pressed.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> + <solid android:color="#770099cc" /> +</shape> diff --git a/sample/src/main/res/drawable-nodpi/buttonstate_standout.xml b/sample/src/main/res/drawable-nodpi/buttonstate_standout.xml new file mode 100644 index 0000000..71cfcd3 --- /dev/null +++ b/sample/src/main/res/drawable-nodpi/buttonstate_standout.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_focused="true" android:state_pressed="false" + android:drawable="@drawable/button_standout_pressed" /> + <item android:state_focused="true" android:state_pressed="true" + android:drawable="@drawable/button_standout_pressed" /> + <item android:state_focused="false" android:state_pressed="true" + android:drawable="@drawable/button_standout_pressed" /> + <item android:drawable="@drawable/button_standout_inactive"/> +</selector> diff --git a/sample/src/main/res/drawable-nodpi/buttonstate_transparent.xml b/sample/src/main/res/drawable-nodpi/buttonstate_transparent.xml new file mode 100644 index 0000000..8ca5594 --- /dev/null +++ b/sample/src/main/res/drawable-nodpi/buttonstate_transparent.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_focused="true" android:state_pressed="false" + android:drawable="@drawable/button_transparent_pressed" /> + <item android:state_focused="true" android:state_pressed="true" + android:drawable="@drawable/button_transparent_pressed" /> + <item android:state_focused="false" android:state_pressed="true" + android:drawable="@drawable/button_transparent_pressed" /> + <item android:drawable="@drawable/transparent"/> +</selector> diff --git a/sample/src/main/res/drawable-nodpi/pushpin_blue.png b/sample/src/main/res/drawable-nodpi/pushpin_blue.png Binary files differnew file mode 100644 index 0000000..bb6d1ff --- /dev/null +++ b/sample/src/main/res/drawable-nodpi/pushpin_blue.png diff --git a/sample/src/main/res/drawable-nodpi/transparent.xml b/sample/src/main/res/drawable-nodpi/transparent.xml new file mode 100644 index 0000000..f4f33d9 --- /dev/null +++ b/sample/src/main/res/drawable-nodpi/transparent.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> + <solid android:color="#00000000" /> +</shape> diff --git a/sample/src/main/res/drawable-xhdpi/next.png b/sample/src/main/res/drawable-xhdpi/next.png Binary files differnew file mode 100644 index 0000000..7dc45c0 --- /dev/null +++ b/sample/src/main/res/drawable-xhdpi/next.png diff --git a/sample/src/main/res/drawable-xhdpi/play.png b/sample/src/main/res/drawable-xhdpi/play.png Binary files differnew file mode 100644 index 0000000..5112499 --- /dev/null +++ b/sample/src/main/res/drawable-xhdpi/play.png diff --git a/sample/src/main/res/drawable-xhdpi/previous.png b/sample/src/main/res/drawable-xhdpi/previous.png Binary files differnew file mode 100644 index 0000000..e97e910 --- /dev/null +++ b/sample/src/main/res/drawable-xhdpi/previous.png diff --git a/sample/src/main/res/drawable-xhdpi/reset.png b/sample/src/main/res/drawable-xhdpi/reset.png Binary files differnew file mode 100644 index 0000000..e1082da --- /dev/null +++ b/sample/src/main/res/drawable-xhdpi/reset.png diff --git a/sample/src/main/res/drawable-xhdpi/rotate.png b/sample/src/main/res/drawable-xhdpi/rotate.png Binary files differnew file mode 100644 index 0000000..1ba064f --- /dev/null +++ b/sample/src/main/res/drawable-xhdpi/rotate.png diff --git a/sample/src/main/res/layout/animation_activity.xml b/sample/src/main/res/layout/animation_activity.xml new file mode 100644 index 0000000..c8adca9 --- /dev/null +++ b/sample/src/main/res/layout/animation_activity.xml @@ -0,0 +1,24 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next"/> + + <ImageView style="@style/footerButton" + android:id="@+id/play" + android:layout_toStartOf="@id/next" + android:src="@drawable/play" + android:contentDescription="@string/button.animate"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:layout_toStartOf="@id/play" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <com.davemorrissey.labs.subscaleview.test.extension.views.PinView style="@style/mainPanel" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/extension_circle_fragment.xml b/sample/src/main/res/layout/extension_circle_fragment.xml new file mode 100644 index 0000000..1ad2add --- /dev/null +++ b/sample/src/main/res/layout/extension_circle_fragment.xml @@ -0,0 +1,19 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:text="@string/extension.p2.text" + android:layout_toStartOf="@id/next" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <com.davemorrissey.labs.subscaleview.test.extension.views.CircleView style="@style/mainPanel" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/extension_freehand_fragment.xml b/sample/src/main/res/layout/extension_freehand_fragment.xml new file mode 100644 index 0000000..4dead6d --- /dev/null +++ b/sample/src/main/res/layout/extension_freehand_fragment.xml @@ -0,0 +1,25 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next" android:visibility="invisible"/> + + <ImageView style="@style/footerButton" + android:id="@+id/reset" + android:layout_toStartOf="@id/next" + android:src="@drawable/reset" + android:contentDescription="@string/button.reset"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:text="@string/extension.p3.text" + android:layout_toStartOf="@id/reset" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <com.davemorrissey.labs.subscaleview.test.extension.views.FreehandView style="@style/mainPanel" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/extension_pin_fragment.xml b/sample/src/main/res/layout/extension_pin_fragment.xml new file mode 100644 index 0000000..4b55e59 --- /dev/null +++ b/sample/src/main/res/layout/extension_pin_fragment.xml @@ -0,0 +1,19 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous" android:visibility="invisible"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:text="@string/extension.p1.text" + android:layout_toStartOf="@id/next" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <com.davemorrissey.labs.subscaleview.test.extension.views.PinView style="@style/mainPanel" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/fragments_activity.xml b/sample/src/main/res/layout/fragments_activity.xml new file mode 100644 index 0000000..5624f75 --- /dev/null +++ b/sample/src/main/res/layout/fragments_activity.xml @@ -0,0 +1,5 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <FrameLayout android:id="@+id/frame" style="@style/fill"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/imagedisplay_large_fragment.xml b/sample/src/main/res/layout/imagedisplay_large_fragment.xml new file mode 100644 index 0000000..442fc67 --- /dev/null +++ b/sample/src/main/res/layout/imagedisplay_large_fragment.xml @@ -0,0 +1,19 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous" android:visibility="invisible"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:text="@string/display.p1.text" + android:layout_toStartOf="@id/next" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView style="@style/mainPanel" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/imagedisplay_region_fragment.xml b/sample/src/main/res/layout/imagedisplay_region_fragment.xml new file mode 100644 index 0000000..6c8b3d2 --- /dev/null +++ b/sample/src/main/res/layout/imagedisplay_region_fragment.xml @@ -0,0 +1,25 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next" android:visibility="invisible"/> + + <ImageView style="@style/footerButton" + android:id="@+id/rotate" + android:layout_toStartOf="@id/next" + android:src="@drawable/rotate" + android:contentDescription="@string/button.rotate"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:text="@string/display.p3.text" + android:layout_toStartOf="@id/rotate" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView style="@style/mainPanel" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/imagedisplay_rotate_fragment.xml b/sample/src/main/res/layout/imagedisplay_rotate_fragment.xml new file mode 100644 index 0000000..9dbf50a --- /dev/null +++ b/sample/src/main/res/layout/imagedisplay_rotate_fragment.xml @@ -0,0 +1,25 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next"/> + + <ImageView style="@style/footerButton" + android:id="@+id/rotate" + android:layout_toStartOf="@id/next" + android:src="@drawable/rotate" + android:contentDescription="@string/button.rotate"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:text="@string/display.p2.text" + android:layout_toStartOf="@id/rotate" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView style="@style/mainPanel" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/main.xml b/sample/src/main/res/layout/main.xml new file mode 100644 index 0000000..5205b60 --- /dev/null +++ b/sample/src/main/res/layout/main.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <LinearLayout android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <LinearLayout + android:layout_width="300dp" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="10dp" + android:layout_marginBottom="10dp" + android:orientation="vertical"> + + <View style="@style/indexDivider"/> + <TextView style="@style/indexLink" android:id="@+id/basicFeatures" android:text="@string/basic.link"/> + <View style="@style/indexDivider"/> + <TextView style="@style/indexLink" android:id="@+id/imageDisplay" android:text="@string/display.link"/> + <View style="@style/indexDivider"/> + <TextView style="@style/indexLink" android:id="@+id/eventHandling" android:text="@string/event.link"/> + <View style="@style/indexDivider"/> + <TextView style="@style/indexLink" android:id="@+id/advancedEventHandling" android:text="@string/advancedevent.link"/> + <View style="@style/indexDivider"/> + <TextView style="@style/indexLink" android:id="@+id/viewPagerGalleries" android:text="@string/pager.link"/> + <View style="@style/indexDivider"/> + <TextView style="@style/indexLink" android:id="@+id/animation" android:text="@string/animation.link"/> + <View style="@style/indexDivider"/> + <TextView style="@style/indexLink" android:id="@+id/extension" android:text="@string/extension.link"/> + <View style="@style/indexDivider"/> + <TextView style="@style/indexLink" android:id="@+id/configuration" android:text="@string/configuration.link"/> + <View style="@style/indexDivider"/> + + </LinearLayout> + + <Button + android:id="@+id/github" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="10dp" + android:layout_gravity="center_horizontal" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:textSize="16sp" + android:text="@string/main.viewongithub"/> + + </LinearLayout> +</ScrollView> diff --git a/sample/src/main/res/layout/pages_activity.xml b/sample/src/main/res/layout/pages_activity.xml new file mode 100644 index 0000000..46014bb --- /dev/null +++ b/sample/src/main/res/layout/pages_activity.xml @@ -0,0 +1,18 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:layout_toStartOf="@id/next" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView style="@style/mainPanel" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/view_pager.xml b/sample/src/main/res/layout/view_pager.xml new file mode 100644 index 0000000..6188097 --- /dev/null +++ b/sample/src/main/res/layout/view_pager.xml @@ -0,0 +1,20 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <RelativeLayout style="@style/footer" android:id="@+id/footer"> + + <ImageView style="@style/previousButton" android:id="@+id/previous" android:contentDescription="@string/button.previous"/> + + <ImageView style="@style/nextButton" android:id="@+id/next" android:contentDescription="@string/button.next"/> + + <TextView style="@style/footerNote" + android:id="@+id/note" + android:layout_toStartOf="@id/next" + android:layout_toEndOf="@id/previous"/> + + </RelativeLayout> + + <android.support.v4.view.ViewPager style="@style/mainPanel" android:id="@+id/horizontal_pager" android:visibility="gone" /> + + <com.davemorrissey.labs.subscaleview.test.viewpager.VerticalViewPager style="@style/mainPanel" android:id="@+id/vertical_pager" android:visibility="gone"/> + +</RelativeLayout> diff --git a/sample/src/main/res/layout/view_pager_page.xml b/sample/src/main/res/layout/view_pager_page.xml new file mode 100644 index 0000000..0f1ede4 --- /dev/null +++ b/sample/src/main/res/layout/view_pager_page.xml @@ -0,0 +1,5 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/fill"> + + <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView style="@style/fill" android:id="@+id/imageView"/> + +</RelativeLayout> diff --git a/sample/src/main/res/mipmap-hdpi/ic_launcher.png b/sample/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differnew file mode 100755 index 0000000..9033709 --- /dev/null +++ b/sample/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/sample/src/main/res/mipmap-mdpi/ic_launcher.png b/sample/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differnew file mode 100755 index 0000000..0678107 --- /dev/null +++ b/sample/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/sample/src/main/res/mipmap-xhdpi/ic_launcher.png b/sample/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differnew file mode 100755 index 0000000..d3ff849 --- /dev/null +++ b/sample/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png b/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differnew file mode 100755 index 0000000..02ea3d8 --- /dev/null +++ b/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differnew file mode 100755 index 0000000..c70d438 --- /dev/null +++ b/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/sample/src/main/res/values/colors.xml b/sample/src/main/res/values/colors.xml new file mode 100644 index 0000000..2f29f49 --- /dev/null +++ b/sample/src/main/res/values/colors.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="background">#111111</color> + <color name="actionBarBackground">#282828</color> +</resources> diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml new file mode 100644 index 0000000..4908cac --- /dev/null +++ b/sample/src/main/res/values/strings.xml @@ -0,0 +1,182 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="app.name">SSIV Test App</string> + + <string name="main.title">Subsampling Scale Image View</string> + + <string name="main.viewongithub">View on GitHub</string> + + <string name="button.animate">Animate</string> + <string name="button.next">Next</string> + <string name="button.previous">Previous</string> + <string name="button.rotate">Rotate</string> + <string name="button.reset">Reset</string> + + <string name="basic.link">Basic features</string> + <string name="basic.title">Basic features</string> + <string name="basic.p1.subtitle">Pinch to zoom</string> + <string name="basic.p1.text"> + Use a two finger pinch to zoom in and out. The zoom is centred on the pinch gesture, and you can pan at the same time. + </string> + <string name="basic.p2.subtitle">Quick scale</string> + <string name="basic.p2.text"> + Double tap and swipe up or down to zoom in or out. The zoom is centred where you tapped. + </string> + <string name="basic.p3.subtitle">Drag</string> + <string name="basic.p3.text">Use one finger to drag the image around.</string> + <string name="basic.p4.subtitle">Fling</string> + <string name="basic.p4.text"> + If you drag quickly and let go, fling momentum keeps the image moving. + </string> + <string name="basic.p5.subtitle">Double tap</string> + <string name="basic.p5.text"> + Double tap the image to zoom in to that spot. Double tap again to zoom out. + </string> + + <string name="display.link">Image display</string> + <string name="display.title">Image display</string> + <string name="display.p1.subtitle">Large images</string> + <string name="display.p1.text"> + This image is 7,800 x 6,240 pixels. On most devices it will be subsampled, and higher quality tiles are loaded as you zoom in. + </string> + <string name="display.p2.subtitle">Rotation</string> + <string name="display.p2.text"> + This image has been rotated 90 degrees. Tap the button to rotate it. EXIF rotation is supported for external files. + </string> + <string name="display.p3.subtitle">Display region</string> + <string name="display.p3.text">Set the region to display instead of the whole image.</string> + + <string name="event.link">Event handling</string> + <string name="event.title">Event handling</string> + <string name="event.p1.subtitle">Simple events</string> + <string name="event.p1.text"> + Touch handling by the image view doesn\'t prevent normal events from working. + </string> + <string name="event.p2.subtitle">OnClickListener</string> + <string name="event.p2.text"> + This view has an OnClickListener. Tap once to activate the click. + </string> + <string name="event.p3.subtitle">OnLongClickListener</string> + <string name="event.p3.text"> + This view has an OnLongClickListener. Press and hold to activate it. + </string> + + <string name="advancedevent.link">Advanced event handling</string> + <string name="advancedevent.title">Advanced event handling</string> + <string name="advancedevent.p1.subtitle">Overriding gestures</string> + <string name="advancedevent.p1.text">Some gestures can be overridden with your own + GestureDetector without affecting the image view. This allows you to get the coordinates of + the event. + </string> + <string name="advancedevent.p2.subtitle">onSingleTapConfirmed</string> + <string name="advancedevent.p2.text">onSingleTapConfirmed has been overridden. Tap the image to + see coordinates. + </string> + <string name="advancedevent.p3.subtitle">onDoubleTap</string> + <string name="advancedevent.p3.text">onDoubleTap has been overridden. Tap the image to see + coordinates. This overrides the default zoom in behaviour. + </string> + <string name="advancedevent.p4.subtitle">onLongPress</string> + <string name="advancedevent.p4.text">onLongPress has been overridden. Press and hold the image + to see coordinates. + </string> + <string name="advancedevent.p5.subtitle">Other events</string> + <string name="advancedevent.p5.text">You can override any event you want, but customising swipe, + fling and zoom gestures will stop the view working normally. + </string> + + + <string name="pager.link">View pager galleries</string> + <string name="pager.title">View pager gallery</string> + <string name="pager.p1.subtitle">Horizontal</string> + <string name="pager.p1.text"> + This gallery has two images in a ViewPager. Swipe to move to the + next image. If you\'re zoomed in on an image, you need to pan to the right of it, then swipe + again to activate the pager. + </string> + <string name="pager.p2.subtitle">Vertical</string> + <string name="pager.p2.text"> + Vertical view pagers are also supported. Swipe up to move to the + next image. If you\'re zoomed in on an image, you need to pan to the bottom of it, then + swipe again to activate the pager. + </string> + + <string name="animation.link">Animation</string> + <string name="animation.title">Animation</string> + <string name="animation.p1.subtitle">A demo</string> + <string name="animation.p1.text"> + Tap the play button. The image will scale and zoom to a random point, shown by a marker. + </string> + <string name="animation.p2.subtitle">Limited pan</string> + <string name="animation.p2.text"> + If the target point is near the edge of the image, it will be moved as near to the center as possible. + </string> + <string name="animation.p3.subtitle">Unlimited pan</string> + <string name="animation.p3.text"> + With unlimited or center-limited pan, the target point can always be animated to the center. + </string> + <string name="animation.p4.subtitle">Customisation</string> + <string name="animation.p4.text"> + Duration and easing are configurable. You can also make animations non-interruptible. + </string> + + <string name="extension.link">Extension</string> + <string name="extension.title">Extension</string> + <string name="extension.p1.subtitle">Location pin</string> + <string name="extension.p1.text"> + This view class extends the image view, and adds a pin anchored to a point on the image. + </string> + <string name="extension.p2.subtitle">Overlaid circle</string> + <string name="extension.p2.text"> + A slightly more advanced example, this shows a circle that will + move and scale with the image. (Due to a limitation in Android, this circle may disappear + when it\'s larger than 2048px.) + </string> + <string name="extension.p3.subtitle">Freehand drawing</string> + <string name="extension.p3.text"> + This subclass adds event detection. Draw a freehand line; it + will move with the image. (Due to a limitation in Android, your drawing may disappear when + it\'s larger than 2048px.) + </string> + + <string name="configuration.link">Configuration</string> + <string name="configuration.title">Configuration</string> + <string name="configuration.p1.subtitle">Maximum scale</string> + <string name="configuration.p1.text"> + The maximum scale has been set to 50dpi. You can zoom in until the image is very pixellated. + </string> + <string name="configuration.p2.subtitle">Minimum tile DPI</string> + <string name="configuration.p2.text"> + The minimum tile DPI has been set to 50dpi, to reduce + memory usage. The next layer of tiles will not be loaded until the image is very pixellated. + </string> + <string name="configuration.p3.subtitle">Pan disabled</string> + <string name="configuration.p3.text"> + Dragging has been disabled. You can only zoom in to the centre point. + </string> + <string name="configuration.p4.subtitle">Zoom disabled</string> + <string name="configuration.p4.text"> + Zooming has been disabled. You can drag the image around. + </string> + <string name="configuration.p5.subtitle">Double tap style</string> + <string name="configuration.p5.text"> + On double tap, the tapped point is now zoomed to the center of the screen instead of remaining in the same place. + </string> + <string name="configuration.p6.subtitle">Double tap style</string> + <string name="configuration.p6.text">On double tap, the zoom now happens immediately.</string> + <string name="configuration.p7.subtitle">Double tap scale</string> + <string name="configuration.p7.text">The double tap zoom scale has been set to 240dpi.</string> + <string name="configuration.p8.subtitle">Pan limit center</string> + <string name="configuration.p8.text"> + The pan limit has been changed to PAN_LIMIT_CENTER. Panning stops when a corner reaches the centre of the screen. + </string> + <string name="configuration.p9.subtitle">Pan limit outside</string> + <string name="configuration.p9.text"> + The pan limit has been changed to PAN_LIMIT_OUTSIDE. Panning stops when the image is just off screen. + </string> + <string name="configuration.p10.subtitle">Debug</string> + <string name="configuration.p10.text"> + Debug has been enabled. This shows the tile boundaries and sizes. + </string> + +</resources>
\ No newline at end of file diff --git a/sample/src/main/res/values/style.xml b/sample/src/main/res/values/style.xml new file mode 100644 index 0000000..023db6e --- /dev/null +++ b/sample/src/main/res/values/style.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="sampleTheme" parent="@android:style/Theme.Holo"> + <item name="android:actionBarStyle">@style/sampleActionBar</item> + <item name="android:windowBackground">@color/background</item> + </style> + + <style name="sampleActionBar" parent="@android:style/Widget.Holo.ActionBar"> + <item name="android:background">@color/actionBarBackground</item> + </style> + + <style name="indexDivider"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">1px</item> + <item name="android:background">#333333</item> + </style> + + <style name="indexLink"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:background">@drawable/buttonstate_transparent</item> + <item name="android:gravity">center_horizontal</item> + <item name="android:padding">10dp</item> + <item name="android:textSize">18sp</item> + </style> + + <style name="fill"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">match_parent</item> + </style> + + <style name="mainPanel"> + <item name="android:layout_alignParentTop">true</item> + <item name="android:layout_above">@+id/footer</item> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">match_parent</item> + </style> + + <style name="footer"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_alignParentBottom">true</item> + <item name="android:background">#333</item> + </style> + + <style name="footerNote"> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_centerVertical">true</item> + <item name="android:padding">10dp</item> + <item name="android:textSize">14sp</item> + <item name="android:textColor">#FFFFFF</item> + </style> + + <style name="footerButton"> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_centerVertical">true</item> + <item name="android:background">@drawable/buttonstate_transparent</item> + <item name="android:paddingLeft">8dp</item> + <item name="android:paddingRight">8dp</item> + <item name="android:paddingTop">18dp</item> + <item name="android:paddingBottom">18dp</item> + <item name="android:src">@drawable/previous</item> + </style> + + <style name="previousButton" parent="@style/footerButton"> + <item name="android:layout_alignParentStart">true</item> + <item name="android:src">@drawable/previous</item> + </style> + + <style name="nextButton" parent="@style/footerButton"> + <item name="android:layout_alignParentEnd">true</item> + <item name="android:src">@drawable/next</item> + </style> + +</resources> |