summaryrefslogtreecommitdiffstats
path: root/res/layout/camera_controls.xml
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-11-21 15:56:32 -0800
committerSteve Kondik <steve@cyngn.com>2016-11-21 15:56:32 -0800
commit272f70b628bb615cba2e7e8fd4eb9b2fd6389d4b (patch)
treed4f68bbc7c234e076926c03ca6fd29952b386ac6 /res/layout/camera_controls.xml
parent83b2bea3e37ecb7b68a7b75b3cc4436ab3501e10 (diff)
downloadandroid_packages_apps_Snap-272f70b628bb615cba2e7e8fd4eb9b2fd6389d4b.zip
android_packages_apps_Snap-272f70b628bb615cba2e7e8fd4eb9b2fd6389d4b.tar.gz
android_packages_apps_Snap-272f70b628bb615cba2e7e8fd4eb9b2fd6389d4b.tar.bz2
snap: Fix bottom bar layout
* Fix all the widths so we resize properly when there are two shutter buttons, and so that we don't start the app with the controls off center. Change-Id: I51e0a5c9bbb6a55625d385d1e52b01a88338e6cf
Diffstat (limited to 'res/layout/camera_controls.xml')
-rw-r--r--res/layout/camera_controls.xml64
1 files changed, 36 insertions, 28 deletions
diff --git a/res/layout/camera_controls.xml b/res/layout/camera_controls.xml
index b447dec..39bedb0 100644
--- a/res/layout/camera_controls.xml
+++ b/res/layout/camera_controls.xml
@@ -71,7 +71,8 @@
android:id="@+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/preview_bottom_margin"
- android:gravity="bottom"
+ android:gravity="center"
+ android:weightSum="100"
android:background="@drawable/camera_controls_bg_translucent"
android:orientation="horizontal">
@@ -79,36 +80,43 @@
android:id="@+id/preview_thumb"
android:layout_width="0dp"
android:layout_height="@dimen/thumbnail_size"
- android:layout_weight="1"
- android:layout_gravity="center"
+ android:layout_weight="25"
+ android:layout_gravity="center_horizontal|center_vertical"
android:background="@android:color/transparent"
android:contentDescription="@string/switch_photo_filmstrip"
android:scaleType="fitCenter" />
- <com.android.camera.ShutterButton
- android:id="@+id/shutter_button"
+ <LinearLayout
android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:clickable="true"
- android:contentDescription="@string/accessibility_shutter_button"
- android:focusable="true"
- android:scaleType="fitCenter"
- android:src="@drawable/btn_new_shutter" />
-
- <ImageView
- android:id="@+id/video_button"
- android:visibility="gone"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:clickable="true"
- android:contentDescription="@string/accessibility_shutter_button"
- android:focusable="true"
- android:scaleType="fitCenter"
- android:src="@drawable/btn_new_shutter_video" />
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:layout_weight="50"
+ android:orientation="horizontal">
+
+ <com.android.camera.ShutterButton
+ android:id="@+id/shutter_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal|center_vertical"
+ android:clickable="true"
+ android:contentDescription="@string/accessibility_shutter_button"
+ android:focusable="true"
+ android:scaleType="fitCenter"
+ android:src="@drawable/btn_new_shutter" />
+
+ <ImageView
+ android:id="@+id/video_button"
+ android:visibility="gone"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal|center_vertical"
+ android:clickable="true"
+ android:contentDescription="@string/accessibility_shutter_button"
+ android:focusable="true"
+ android:scaleType="fitCenter"
+ android:src="@drawable/btn_new_shutter_video" />
+
+ </LinearLayout>
<com.android.camera.ui.ModuleSwitcher
android:id="@+id/camera_switcher"
@@ -116,8 +124,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:scaleType="center"
- android:layout_weight="1"
- android:layout_gravity="center"
+ android:layout_weight="25"
+ android:layout_gravity="center_horizontal|center_vertical"
android:contentDescription="@string/accessibility_mode_picker" />
</LinearLayout>