diff options
author | Doris Liu <tianliu@google.com> | 2013-04-22 17:13:22 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-22 17:13:22 +0000 |
commit | 9523e9148356c875044512ad3a321490b665fbda (patch) | |
tree | 9f2b59aea9dd3efff30c78db7e5f9b2b798f82a9 /src/com/android/camera | |
parent | d4883e406ad43df815ede45e9aff23c6a4aa4457 (diff) | |
parent | 8afd3b1f1ec70ea110bf99e3948cc2d7343680ea (diff) | |
download | android_packages_apps_Snap-9523e9148356c875044512ad3a321490b665fbda.tar.gz android_packages_apps_Snap-9523e9148356c875044512ad3a321490b665fbda.tar.bz2 android_packages_apps_Snap-9523e9148356c875044512ad3a321490b665fbda.zip |
Merge "Fix for camera switcher hard to hit" into gb-ub-photos-bryce
Diffstat (limited to 'src/com/android/camera')
-rw-r--r-- | src/com/android/camera/PreviewGestures.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/camera/PreviewGestures.java b/src/com/android/camera/PreviewGestures.java index b968a0244..90ab075d2 100644 --- a/src/com/android/camera/PreviewGestures.java +++ b/src/com/android/camera/PreviewGestures.java @@ -317,6 +317,14 @@ public class PreviewGestures private boolean isInside(MotionEvent evt, View v) { v.getLocationInWindow(mLocation); + // when view is flipped horizontally + if ((int) v.getRotationY() == 180) { + mLocation[0] -= v.getWidth(); + } + // when view is flipped vertically + if ((int) v.getRotationX() == 180) { + mLocation[1] -= v.getHeight(); + } return (v.getVisibility() == View.VISIBLE && evt.getX() >= mLocation[0] && evt.getX() < mLocation[0] + v.getWidth() && evt.getY() >= mLocation[1] && evt.getY() < mLocation[1] + v.getHeight()); |