summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-02-21 14:15:27 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-02-21 17:38:23 +0100
commit84e4170aff12e0e6dbaec1b0ae5a98372a0d091c (patch)
tree1fd7bcec52b64511e425203957459fa1c2a3c160 /android
parent39d96445ce65da3fb36ee5af3e99fab143af476f (diff)
downloadmupdf-84e4170aff12e0e6dbaec1b0ae5a98372a0d091c.tar.xz
Use a fixed duration of 400ms for scroll animation.
Make fade in/out animations 200ms long, the same as the default animation duration for iOS UI animations.
Diffstat (limited to 'android')
-rw-r--r--android/res/anim/fade_in.xml2
-rw-r--r--android/res/anim/fade_out.xml2
-rw-r--r--android/src/com/artifex/mupdf/ReaderView.java3
3 files changed, 3 insertions, 4 deletions
diff --git a/android/res/anim/fade_in.xml b/android/res/anim/fade_in.xml
index 65bf6edd..b2af62ca 100644
--- a/android/res/anim/fade_in.xml
+++ b/android/res/anim/fade_in.xml
@@ -2,4 +2,4 @@
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0"
android:toAlpha="1.0"
- android:duration="100" />
+ android:duration="200" />
diff --git a/android/res/anim/fade_out.xml b/android/res/anim/fade_out.xml
index efde8c13..7d742df3 100644
--- a/android/res/anim/fade_out.xml
+++ b/android/res/anim/fade_out.xml
@@ -2,4 +2,4 @@
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="1.0"
android:toAlpha="0.0"
- android:duration="100" />
+ android:duration="200" />
diff --git a/android/src/com/artifex/mupdf/ReaderView.java b/android/src/com/artifex/mupdf/ReaderView.java
index 811f8b78..76bf0eee 100644
--- a/android/src/com/artifex/mupdf/ReaderView.java
+++ b/android/src/com/artifex/mupdf/ReaderView.java
@@ -539,8 +539,7 @@ public class ReaderView extends AdapterView<Adapter>
Point corr = getCorrection(getScrollBounds(v));
if (corr.x != 0 || corr.y != 0) {
mScrollerLastX = mScrollerLastY = 0;
- mScroller.startScroll(0, 0, corr.x, corr.y,
- Math.max(Math.abs(corr.x), Math.abs(corr.y))*SCROLL_SPEED);
+ mScroller.startScroll(0, 0, corr.x, corr.y, 400);
post(this);
}
}