summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-11-30 09:56:12 +0800
committerHung-ying Tyan <tyanh@google.com>2010-11-30 09:56:12 +0800
commit976ac8fda15ae9f6209ccbaab3aeedb23c91281c (patch)
tree7473444fe5398d1508d7bc887ab6d39041397ae3 /src/com
parentdf4ee3ee947cac4683975f065d61e623f8d6b8d5 (diff)
downloadLegacyCamera-976ac8fda15ae9f6209ccbaab3aeedb23c91281c.zip
LegacyCamera-976ac8fda15ae9f6209ccbaab3aeedb23c91281c.tar.gz
LegacyCamera-976ac8fda15ae9f6209ccbaab3aeedb23c91281c.tar.bz2
Fix misplacement of camera shutter button.
mCenterX should be calculated before laying out the shutter button. Change-Id: I23412f03314adefbbef95fba6d1035d37d1102f5
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/camera/ui/IndicatorWheel.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/IndicatorWheel.java b/src/com/android/camera/ui/IndicatorWheel.java
index dfd717c..1101db5 100644
--- a/src/com/android/camera/ui/IndicatorWheel.java
+++ b/src/com/android/camera/ui/IndicatorWheel.java
@@ -171,6 +171,7 @@ public class IndicatorWheel extends ViewGroup {
int shutterButtonWidth = mShutterButton.getMeasuredWidth();
mShutterButtonRadius = shutterButtonWidth / 2.0;
int shutterButtonHeight = mShutterButton.getMeasuredHeight();
+ mCenterX = (int) (right - left - mShutterButtonRadius * 1.2);
mCenterY = (bottom - top) / 2;
mShutterButton.layout(mCenterX - shutterButtonWidth / 2,
mCenterY - shutterButtonHeight / 2,
@@ -181,7 +182,6 @@ public class IndicatorWheel extends ViewGroup {
// shutter button. So the angle starts from 90 to 270 degrees.
if (count == 1) return;
mWheelRadius = mShutterButtonRadius + mStrokeWidth * 1.5;
- mCenterX = (int) (right - mShutterButtonRadius * 1.2 - left);
double intervalDegrees = 180.0 / (count - 2);
double initialDegrees = 90.0;
int index = 0;