summaryrefslogtreecommitdiffstats
path: root/src/com/android/dreams/phototable/PhotoTouchListener.java
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2013-03-27 17:09:44 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-27 17:09:44 -0700
commit829f039523e3750f982bd1490e08a86b8eabc182 (patch)
treea5f22c4f83be69d5e8998257e18e02449544eeb8 /src/com/android/dreams/phototable/PhotoTouchListener.java
parentb2b6ef497aef97833ea3d20ee8db1519303825be (diff)
parent1dc94b55d59f5c4dbf86788d0c32b7ac4449909a (diff)
downloadandroid_packages_screensavers_PhotoTable-829f039523e3750f982bd1490e08a86b8eabc182.tar.gz
android_packages_screensavers_PhotoTable-829f039523e3750f982bd1490e08a86b8eabc182.tar.bz2
android_packages_screensavers_PhotoTable-829f039523e3750f982bd1490e08a86b8eabc182.zip
am 1dc94b55: add two-finger move gesture.
* commit '1dc94b55d59f5c4dbf86788d0c32b7ac4449909a': add two-finger move gesture.
Diffstat (limited to 'src/com/android/dreams/phototable/PhotoTouchListener.java')
-rw-r--r--src/com/android/dreams/phototable/PhotoTouchListener.java12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/com/android/dreams/phototable/PhotoTouchListener.java b/src/com/android/dreams/phototable/PhotoTouchListener.java
index fd52749..190dc3d 100644
--- a/src/com/android/dreams/phototable/PhotoTouchListener.java
+++ b/src/com/android/dreams/phototable/PhotoTouchListener.java
@@ -118,17 +118,7 @@ public class PhotoTouchListener implements View.OnTouchListener {
final float x1 = x0 + s * dX / v;
final float y1 = y0 + s * dY / v;
- final float photoWidth = ((Integer) target.getTag(R.id.photo_width)).floatValue();
- final float photoHeight = ((Integer) target.getTag(R.id.photo_height)).floatValue();
- final float tableWidth = mTable.getWidth();
- final float tableHeight = mTable.getHeight();
- final float halfShortSide =
- Math.min(photoWidth * mTableRatio, photoHeight * mTableRatio) / 2f;
- final View photo = target;
- boolean flingAway = y1 + halfShortSide < 0f || y1 - halfShortSide > tableHeight ||
- x1 + halfShortSide < 0f || x1 - halfShortSide > tableWidth;
-
- mTable.fling(photo, x1 - x0, y1 - y0, (int) (1000f * n / 60f), flingAway, false);
+ mTable.fling(target, x1 - x0, y1 - y0, (int) (1000f * n / 60f), false);
}
@Override