diff options
author | Chris Wren <cwren@android.com> | 2013-03-21 15:35:16 -0400 |
---|---|---|
committer | Chris Wren <cwren@android.com> | 2013-03-22 16:21:21 -0400 |
commit | 1dc94b55d59f5c4dbf86788d0c32b7ac4449909a (patch) | |
tree | d4b6ba65d7a6c86e4da2954d012c16758c8df19b /src/com/android/dreams/phototable/PhotoTouchListener.java | |
parent | bf44ca22d40dd60b4c30f6a979b80fbd2ffa0078 (diff) | |
download | android_packages_screensavers_PhotoTable-1dc94b55d59f5c4dbf86788d0c32b7ac4449909a.tar.gz android_packages_screensavers_PhotoTable-1dc94b55d59f5c4dbf86788d0c32b7ac4449909a.tar.bz2 android_packages_screensavers_PhotoTable-1dc94b55d59f5c4dbf86788d0c32b7ac4449909a.zip |
add two-finger move gesture.
Bug: 8387448
Change-Id: Ib8a54ee3e978df3c5d15058d4fe82b9e7d6a524b
Diffstat (limited to 'src/com/android/dreams/phototable/PhotoTouchListener.java')
-rw-r--r-- | src/com/android/dreams/phototable/PhotoTouchListener.java | 12 |
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 |