summaryrefslogtreecommitdiffstats
path: root/res/layout/camera_controls.xml
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-11-09 00:08:42 -0800
committerSteve Kondik <steve@cyngn.com>2016-11-13 23:33:36 -0800
commit4538ee80f8a9eb338281db00fb349e111eeb5aaf (patch)
treebb81593e683955db458c96b6b5fb0fdf71b314ae /res/layout/camera_controls.xml
parent0b4b53688f8486537d9d58dc6448ca2db8c67c7d (diff)
downloadandroid_packages_apps_Snap-4538ee80f8a9eb338281db00fb349e111eeb5aaf.tar.gz
android_packages_apps_Snap-4538ee80f8a9eb338281db00fb349e111eeb5aaf.tar.bz2
android_packages_apps_Snap-4538ee80f8a9eb338281db00fb349e111eeb5aaf.zip
snap: UX improvements v1
* Make the camera controls do sane things- get rid of the manual placement of every widget and use layouts * Animate everything correctly * Show ripples when clicking the shutter * Clean up a metric ton of dead code * Moved more code into BaseUI * Make setting up the camera controls less verbose and magical * Fixed up panorama layout Change-Id: Iaed44ca0201a2e2641e1c2460d3ff9ec3eae2d85
Diffstat (limited to 'res/layout/camera_controls.xml')
-rw-r--r--res/layout/camera_controls.xml182
1 files changed, 103 insertions, 79 deletions
diff --git a/res/layout/camera_controls.xml b/res/layout/camera_controls.xml
index 3f097425f..524198713 100644
--- a/res/layout/camera_controls.xml
+++ b/res/layout/camera_controls.xml
@@ -18,12 +18,53 @@
android:layout_width="match_parent"
android:layout_height="match_parent" >
- <View
- android:id="@+id/blocker"
+ <LinearLayout
+ android:id="@+id/top_bar"
android:layout_width="match_parent"
- android:layout_height="@dimen/switcher_size"
- android:layout_gravity="bottom"
- android:clickable="true" />
+ android:layout_height="0dp"
+ android:gravity="center_vertical"
+ android:orientation="horizontal">
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/menu"
+ style="@style/MenuButton"
+ android:contentDescription="@string/accessibility_menu_button"
+ android:layout_weight="1"
+ android:src="@drawable/ic_settings" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/front_back_switcher"
+ android:layout_weight="1"
+ style="@style/MenuButton" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/hdr_switcher"
+ android:layout_weight="1"
+ style="@style/MenuButton" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/ts_makeup_switcher"
+ android:layout_weight="1"
+ style="@style/MenuButton" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/filter_mode_switcher"
+ android:layout_weight="1"
+ style="@style/MenuButton" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/mute_button"
+ android:layout_weight="1"
+ style="@style/MenuButton"
+ android:contentDescription="@string/mute_button_desc"
+ android:src="@drawable/ic_unmuted_button" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/scene_mode_switcher"
+ android:layout_weight="1"
+ style="@style/MenuButton" />
+
+ </LinearLayout>
<include
android:layout_width="64dip"
@@ -33,80 +74,63 @@
android:layout_marginRight="-8dip"
layout="@layout/menu_indicators" />
- <com.android.camera.ui.RotateImageView
- android:id="@+id/filter_mode_switcher"
- style="@style/ToggleButton" />
-
- <com.android.camera.ui.RotateImageView
- android:id="@+id/mute_button"
- style="@style/MenuButton"
- android:contentDescription="@string/mute_button_desc"
- android:src="@drawable/ic_unmuted_button" />
-
- <com.android.camera.ui.ModuleSwitcher
- android:id="@+id/camera_switcher"
- style="@style/SwitcherButton"
- android:layout_gravity="bottom|left"
- android:layout_marginBottom="2dip"
- android:scaleType="center"
- android:contentDescription="@string/accessibility_mode_picker" />
-
- <com.android.camera.ShutterButton
- android:id="@+id/shutter_button"
- android:layout_width="@dimen/shutter_size"
- android:layout_height="@dimen/shutter_size"
- android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/shutter_offset"
- android:layout_marginTop="@dimen/shutter_offset_top"
- 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="invisible"
- android:layout_width="@dimen/shutter_size"
- android:layout_height="@dimen/shutter_size"
- android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/shutter_offset"
- android:clickable="true"
- android:contentDescription="@string/accessibility_shutter_button"
- android:focusable="true"
- android:scaleType="fitCenter"
- android:src="@drawable/btn_new_shutter_video" />
-
- <com.android.camera.ui.RotateImageView
- android:id="@+id/preview_thumb"
- android:layout_width="@dimen/capture_size"
- android:layout_height="@dimen/capture_size"
- android:layout_gravity="top|right"
- android:background="@android:color/transparent"
- android:contentDescription="@string/switch_photo_filmstrip"
- android:scaleType="fitCenter" />
-
- <com.android.camera.ui.RotateImageView
- android:id="@+id/front_back_switcher"
- style="@style/ToggleButton" />
-
- <com.android.camera.ui.RotateImageView
- android:id="@+id/hdr_switcher"
- style="@style/ToggleButton" />
-
- <com.android.camera.ui.RotateImageView
- android:id="@+id/scene_mode_switcher"
- style="@style/ToggleButton" />
-
- <com.android.camera.ui.RotateImageView
- android:id="@+id/menu"
- style="@style/MenuButton"
- android:contentDescription="@string/accessibility_menu_button"
- android:src="@drawable/ic_settings" />
-
- <com.android.camera.ui.RotateImageView
- android:id="@+id/ts_makeup_switcher"
- style="@style/ToggleButton" />
+ <LinearLayout
+ android:id="@+id/bottom_bar"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:gravity="center_vertical"
+ android:weightSum="3"
+ android:orientation="horizontal">
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/preview_thumb"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="center"
+ android:background="@android:color/transparent"
+ android:contentDescription="@string/switch_photo_filmstrip"
+ android:elevation="1dp"
+ android:scaleType="fitCenter" />
+
+ <com.android.camera.ShutterButton
+ android:id="@+id/shutter_button"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:clickable="true"
+ android:contentDescription="@string/accessibility_shutter_button"
+ android:focusable="true"
+ android:scaleType="fitCenter"
+ android:layout_weight="1"
+ android:elevation="1dp"
+ 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:clickable="true"
+ android:contentDescription="@string/accessibility_shutter_button"
+ android:focusable="true"
+ android:scaleType="fitCenter"
+ android:layout_weight="1"
+ android:layout_gravity="center"
+ android:elevation="1dp"
+ android:src="@drawable/btn_new_shutter_video" />
+
+ <com.android.camera.ui.ModuleSwitcher
+ android:id="@+id/camera_switcher"
+ style="@style/SwitcherButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:scaleType="center"
+ android:layout_weight="1"
+ android:layout_gravity="center"
+ android:elevation="1dp"
+ android:contentDescription="@string/accessibility_mode_picker" />
+ </LinearLayout>
<LinearLayout
android:id="@+id/remaining_photos"