diff options
author | Doris Liu <tianliu@google.com> | 2013-04-22 13:40:52 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-04-22 13:40:52 -0700 |
commit | 66a7d8df79df7a8ac475a1fed4777d101ccd5bda (patch) | |
tree | 79e3ceb03b3dbd4c70191c5c040fd35d799e32f5 /src | |
parent | 277545df5b36531331f0b67d8025bf49e095f1ed (diff) | |
parent | acad574d1c2f3c09b4794720921fcc9b2607f1a9 (diff) | |
download | android_packages_apps_Snap-66a7d8df79df7a8ac475a1fed4777d101ccd5bda.tar.gz android_packages_apps_Snap-66a7d8df79df7a8ac475a1fed4777d101ccd5bda.tar.bz2 android_packages_apps_Snap-66a7d8df79df7a8ac475a1fed4777d101ccd5bda.zip |
am d6e6533a: Merge "Fix for camera switcher hard to hit" into gb-ub-photos-bryce
* commit 'd6e6533a054ea526021c3331a18f93a618442f13':
Fix for camera switcher hard to hit
Diffstat (limited to 'src')
-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()); |