summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2013-04-22 17:13:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-22 17:13:22 +0000
commitd6e6533a054ea526021c3331a18f93a618442f13 (patch)
tree5223c40ae73f1ef30a88eda5fb4633b1963b9d76 /src/com
parented689873c9da338859dc8858c08afa4fa31578f2 (diff)
parentfaff668b6f7d0e5d35a65aa926f3af589da6289e (diff)
downloadandroid_packages_apps_Gallery2-d6e6533a054ea526021c3331a18f93a618442f13.tar.gz
android_packages_apps_Gallery2-d6e6533a054ea526021c3331a18f93a618442f13.tar.bz2
android_packages_apps_Gallery2-d6e6533a054ea526021c3331a18f93a618442f13.zip
Merge "Fix for camera switcher hard to hit" into gb-ub-photos-bryce
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/camera/PreviewGestures.java8
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());