From 302dfef488297152978788c2341cd3460727b251 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Sun, 13 Nov 2016 23:27:35 -0800 Subject: snap: UI checkpoint #2 * Fix bugs from previous commit * Factor out recording controls * Clean up layouts * Asynchronous control for video module * Performance improvements Change-Id: I9d5833cecbd9280845b740ee8a3c47f023470625 --- res/layout/camera_controls.xml | 71 +- res/layout/capture_module.xml | 8 +- res/layout/panorama_module.xml | 5 +- res/layout/photo_module.xml | 59 +- res/layout/recording_time.xml | 61 ++ res/layout/video_module.xml | 65 +- res/values/colors.xml | 2 +- res/values/dimens.xml | 2 +- res/values/styles.xml | 2 +- src/com/android/camera/BaseUI.java | 29 +- src/com/android/camera/CameraActivity.java | 30 +- src/com/android/camera/CaptureUI.java | 4 +- src/com/android/camera/PhotoModule.java | 5 +- src/com/android/camera/PhotoUI.java | 13 +- src/com/android/camera/VideoController.java | 2 + src/com/android/camera/VideoModule.java | 932 +++++++++++---------- src/com/android/camera/VideoUI.java | 166 ++-- src/com/android/camera/WideAnglePanoramaUI.java | 6 +- src/com/android/camera/ui/CameraControls.java | 150 ++-- src/com/android/camera/ui/ModuleSwitcher.java | 2 +- src/com/android/camera/ui/RecordingTime.java | 298 +++++++ .../android/camera/ui/ReversibleLinearLayout.java | 57 ++ src/com/android/camera/util/CameraUtil.java | 14 +- 23 files changed, 1228 insertions(+), 755 deletions(-) create mode 100644 res/layout/recording_time.xml create mode 100644 src/com/android/camera/ui/RecordingTime.java create mode 100644 src/com/android/camera/ui/ReversibleLinearLayout.java diff --git a/res/layout/camera_controls.xml b/res/layout/camera_controls.xml index 524198713..1f125145f 100644 --- a/res/layout/camera_controls.xml +++ b/res/layout/camera_controls.xml @@ -20,8 +20,9 @@ @@ -66,26 +67,18 @@ - - - - - + + + android:src="@drawable/btn_new_shutter_video" /> + + - + + diff --git a/res/layout/panorama_module.xml b/res/layout/panorama_module.xml index 5ae300272..b1d0ded17 100644 --- a/res/layout/panorama_module.xml +++ b/res/layout/panorama_module.xml @@ -129,6 +129,7 @@ + android:layout_gravity="center" + style="@style/CameraControls"/> + diff --git a/res/layout/photo_module.xml b/res/layout/photo_module.xml index 794a968f4..d97298909 100644 --- a/res/layout/photo_module.xml +++ b/res/layout/photo_module.xml @@ -21,6 +21,7 @@ layout. --> @@ -31,25 +32,43 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center_vertical|center_horizontal" > - + - - + + + + + + + android:layout_height="match_parent" /> + - - - - - + + + + + diff --git a/res/layout/recording_time.xml b/res/layout/recording_time.xml new file mode 100644 index 000000000..4a7adee9b --- /dev/null +++ b/res/layout/recording_time.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/res/layout/video_module.xml b/res/layout/video_module.xml index f12f06ce7..a6024d5d5 100644 --- a/res/layout/video_module.xml +++ b/res/layout/video_module.xml @@ -15,6 +15,7 @@ --> @@ -23,11 +24,18 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center_vertical|center_horizontal" > - + + + @@ -37,53 +45,32 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone"/> + + - - + - - - - - - - - + + + + + + + diff --git a/res/values/colors.xml b/res/values/colors.xml index 05c7834d4..518a88c63 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -48,7 +48,7 @@ @color/white @color/red - @color/black + #401b1b1b @color/blue @color/blue @color/black diff --git a/res/values/dimens.xml b/res/values/dimens.xml index c8c1896a2..c6dde51c7 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -151,7 +151,7 @@ 48dp - 96dip + 64dip 3dip 175dip diff --git a/res/values/styles.xml b/res/values/styles.xml index 252854682..3e3ef161d 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -125,11 +125,11 @@ @drawable/setting_list_item_bg