diff options
author | Senpo Hu <senpo@google.com> | 2014-11-19 17:11:46 -0800 |
---|---|---|
committer | Senpo Hu <senpo@google.com> | 2014-12-10 12:06:31 -0800 |
commit | 427a915be4bcc84fa1c32d9e9e1b7473c522f732 (patch) | |
tree | 624ea6f516112441e8a67233f0178e96f8e74cfa /res/layout | |
parent | 5777607add70d227aa194635a2c93d03f81ab7fe (diff) | |
download | android_packages_apps_Camera2-427a915be4bcc84fa1c32d9e9e1b7473c522f732.tar.gz android_packages_apps_Camera2-427a915be4bcc84fa1c32d9e9e1b7473c522f732.tar.bz2 android_packages_apps_Camera2-427a915be4bcc84fa1c32d9e9e1b7473c522f732.zip |
New capture indicator design for Haleakala.
* Introduce RoundedThumbnailView and retire PeekView.
* Rename BottomBarModeOptionsWrapper to StickyBottomCaptureLayout.
* Verified on K and L devices.
Thumbnail cropping:
* 100% width and vertically centered for portrait.
* 100% height and horizontally centered for landscape.
General behavior spec:
* Hide the capture indicatorby fading out using fast_out_linear_in (150ms):
1) User open filmstrip.
2) User switch module.
3) User switch front/back camera.
4) User close app.
Behavior spec for non-photo modules:
* Photosphere is stripped of UI so there is no need to show capture
indicator. When a photo sphere is taken (and user is in another mode),
the preview frame used in filmstrip is used in the capture indicator.
* Video: show in viewfinder prior or after capture. Hide during capture.
When a video is taken, the preview frame used in filmstrip is used in
the capture indicator.
* Panorama: Show in viewfinder prior or after capture. Hide during
capture. When a panorama is taken, the preview frame used in filmstrip
is used in the capture indicator.
* Lens blue: Show in viewfinder prior or after capture. Hide during
capture. When a lens blur is taken, the preview frame used in filmstrip
is used in the capture indicator.
Visual spec:
A 12dp spacing between mode option overlay and thumbnail.
1. A circular mask that excludes the corners of the preview image.
2. A solid white layer that sits on top of the preview and is also masked
by (1).
3. The preview image.
4. A 'ripple' which is just a white circular stroke.
Animation spec:
(1) only the scale animates, from 50%(24dp) to 114%(54dp) in 200ms then
falls back to 100%(48dp) in 200ms. Both steps use the same easing:
fast_out_slow_in.
(2) opacity, from 50% to 0% over 150ms, easing is exponential.
(3) doesn't animate.
(4) starts animating after 100ms, when (1) is at its peak radius and all
animations take 200ms, using linear_out_slow in. Opacity goes from 40%
to 0%, radius goes from 40dp to 70dp, stroke width goes from 5dp to 1dp.
Bug: 18317565
Change-Id: Ib8d4f065b98fc3b9b0b627633232ce8cee96eb61
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/activity_main.xml | 6 | ||||
-rw-r--r-- | res/layout/camera.xml | 2 | ||||
-rw-r--r-- | res/layout/sticky_bottom_capture_layout.xml (renamed from res/layout/mode_options_bottombar.xml) | 13 |
3 files changed, 10 insertions, 11 deletions
diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml index ea1b56407..c0eedab43 100644 --- a/res/layout/activity_main.xml +++ b/res/layout/activity_main.xml @@ -23,12 +23,6 @@ android:background="@null"> <include layout="@layout/camera" /> - - <com.android.camera.widget.PeekView - android:id="@+id/peek_view" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="invisible" /> <include layout="@layout/camera_filmstrip" /> <com.android.camera.ui.ModeTransitionView android:id="@+id/mode_transition_view" diff --git a/res/layout/camera.xml b/res/layout/camera.xml index 650ad8fe8..121dc0fbc 100644 --- a/res/layout/camera.xml +++ b/res/layout/camera.xml @@ -67,7 +67,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> - <include layout="@layout/mode_options_bottombar" /> + <include layout="@layout/sticky_bottom_capture_layout" /> <FrameLayout android:id="@+id/tutorials_placeholder_wrapper" diff --git a/res/layout/mode_options_bottombar.xml b/res/layout/sticky_bottom_capture_layout.xml index 97ce8fa7a..6d98c30f3 100644 --- a/res/layout/mode_options_bottombar.xml +++ b/res/layout/sticky_bottom_capture_layout.xml @@ -15,12 +15,18 @@ --> <!-- This layout is shared by phone and tablet in landscape orientation. --> -<com.android.camera.ui.BottomBarModeOptionsWrapper +<com.android.camera.ui.StickyBottomCaptureLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/indicator_bottombar_wrapper" + android:id="@+id/sticky_bottom_capture_layout" android:layout_width="match_parent" android:layout_height="match_parent" > + <com.android.camera.widget.RoundedThumbnailView + android:id="@+id/rounded_thumbnail_view" + android:layout_width="@+dimen/rounded_thumbnail_ripple_ring_diameter_max" + android:layout_height="@+dimen/rounded_thumbnail_ripple_ring_diameter_max" + android:visibility="invisible" /> + <include layout="@layout/mode_options_overlay" /> <com.android.camera.ui.BottomBar @@ -33,5 +39,4 @@ <include layout="@layout/bottom_bar_contents" /> </com.android.camera.ui.BottomBar> -</com.android.camera.ui.BottomBarModeOptionsWrapper> - +</com.android.camera.ui.StickyBottomCaptureLayout> |