diff options
-rw-r--r-- | res/layout-xlarge/camera_control.xml | 10 | ||||
-rw-r--r-- | src/com/android/camera/ui/IndicatorWheel.java | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/res/layout-xlarge/camera_control.xml b/res/layout-xlarge/camera_control.xml index 132bcea..0476763 100644 --- a/res/layout-xlarge/camera_control.xml +++ b/res/layout-xlarge/camera_control.xml @@ -18,10 +18,14 @@ xmlns:camera="http://schemas.android.com/apk/res/com.android.camera" android:id="@+id/control_panel" android:layout_height="match_parent" - android:layout_width="wrap_content" + android:layout_width="300dp" android:layout_alignParentRight="true" android:layout_marginTop="40dp" android:layout_marginBottom="40dp"> + <!-- The width is determined by IndicatorWheel so we should set + layout_width as wrap_contant instead of hardcoding the width + but somehow doing so makes the control panel occupy the whole + screen width. Framework bug? --> <ViewStub android:id="@+id/zoom_stub" android:inflatedId="@+id/zoom_picker" @@ -52,9 +56,9 @@ android:visibility="gone" /> <com.android.camera.ui.IndicatorWheel android:id="@+id/indicator_wheel" - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerInParent="true" + android:layout_centerVertical="true" android:layout_alignParentRight="true"> <com.android.camera.ShutterButton android:id="@+id/shutter_button" android:layout_height="wrap_content" diff --git a/src/com/android/camera/ui/IndicatorWheel.java b/src/com/android/camera/ui/IndicatorWheel.java index f35334e..dfd717c 100644 --- a/src/com/android/camera/ui/IndicatorWheel.java +++ b/src/com/android/camera/ui/IndicatorWheel.java @@ -181,7 +181,7 @@ 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); + mCenterX = (int) (right - mShutterButtonRadius * 1.2 - left); double intervalDegrees = 180.0 / (count - 2); double initialDegrees = 90.0; int index = 0; |