diff options
| author | 2020-06-23 13:15:24 -0400 | |
|---|---|---|
| committer | 2020-06-23 14:41:47 -0400 | |
| commit | f2e6891752f7e9c7f7c05e61934a71d69407f09f (patch) | |
| tree | 176329ab037bde67f9b550b420943bac77f4db12 | |
| parent | da525e98d52b4fb89f195e32acb19d6110203ef1 (diff) | |
Media - Limit size of output switcher and app name
Make sure that there is a gap at least 10dp to the left and right of center
vertical in media view, between app name and output switcher.
Test: manual
Fixes: 159708142
Change-Id: If142bd920b6921c9d82fa2d6dfb2595f123df2ac
| -rw-r--r-- | packages/SystemUI/res/layout/media_view.xml | 17 | ||||
| -rw-r--r-- | packages/SystemUI/res/values/dimens.xml | 1 | ||||
| -rw-r--r-- | packages/SystemUI/res/xml/media_collapsed.xml | 10 | ||||
| -rw-r--r-- | packages/SystemUI/res/xml/media_expanded.xml | 10 |
4 files changed, 25 insertions, 13 deletions
diff --git a/packages/SystemUI/res/layout/media_view.xml b/packages/SystemUI/res/layout/media_view.xml index 07bbb8f40eb8..07b30453afff 100644 --- a/packages/SystemUI/res/layout/media_view.xml +++ b/packages/SystemUI/res/layout/media_view.xml @@ -26,6 +26,14 @@ android:gravity="center_horizontal|fill_vertical" android:background="@drawable/qs_media_background"> + <androidx.constraintlayout.widget.Guideline + android:id="@+id/center_vertical_guideline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.5" + /> + <!-- As per Material Design on Biderectionality, this is forced to LTR in code --> <FrameLayout android:id="@+id/notification_media_progress_time" @@ -155,15 +163,6 @@ android:src="@drawable/ic_cast_connected" android:forceHasOverlappingRendering="false" /> - <androidx.constraintlayout.widget.Barrier - android:id="@+id/media_seamless_barrier" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - app:barrierDirection="start" - app:constraint_referenced_ids="media_seamless,media_seamless_fallback" - app:barrierAllowsGoneWidgets="false" - /> - <!-- Seek Bar --> <!-- As per Material Design on Biderectionality, this is forced to LTR in code --> <SeekBar diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 29a2ad4cba9f..c784fec00c00 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -1268,6 +1268,7 @@ <dimen name="qs_media_padding">16dp</dimen> <dimen name="qs_media_panel_outer_padding">16dp</dimen> <dimen name="qs_media_album_size">52dp</dimen> + <dimen name="qs_center_guideline_padding">10dp</dimen> <dimen name="qs_seamless_icon_size">20dp</dimen> <dimen name="qs_seamless_fallback_icon_size">20dp</dimen> <dimen name="qs_seamless_fallback_top_margin">18dp</dimen> diff --git a/packages/SystemUI/res/xml/media_collapsed.xml b/packages/SystemUI/res/xml/media_collapsed.xml index 811e0e351bd3..0926a9802ff4 100644 --- a/packages/SystemUI/res/xml/media_collapsed.xml +++ b/packages/SystemUI/res/xml/media_collapsed.xml @@ -31,12 +31,12 @@ android:id="@+id/app_name" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginEnd="10dp" + android:layout_marginEnd="@dimen/qs_center_guideline_padding" android:layout_marginStart="10dp" android:layout_marginTop="20dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toEndOf="@id/icon" - app:layout_constraintEnd_toStartOf="@id/media_seamless_barrier" + app:layout_constraintEnd_toStartOf="@id/center_vertical_guideline" app:layout_constraintHorizontal_bias="0" /> @@ -47,8 +47,11 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintWidth_min="60dp" + app:layout_constraintStart_toEndOf="@id/center_vertical_guideline" + app:layout_constraintHorizontal_bias="1" android:layout_marginTop="@dimen/qs_media_panel_outer_padding" android:layout_marginEnd="@dimen/qs_media_panel_outer_padding" + android:layout_marginStart="@dimen/qs_center_guideline_padding" /> <Constraint @@ -57,10 +60,13 @@ android:layout_height="@dimen/qs_seamless_fallback_icon_size" android:layout_marginTop="@dimen/qs_seamless_fallback_top_margin" android:layout_marginEnd="@dimen/qs_seamless_fallback_end_margin" + android:layout_marginStart="@dimen/qs_center_guideline_padding" android:alpha="0.5" android:visibility="gone" + app:layout_constraintHorizontal_bias="1" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toEndOf="@id/center_vertical_guideline" /> <Constraint diff --git a/packages/SystemUI/res/xml/media_expanded.xml b/packages/SystemUI/res/xml/media_expanded.xml index 8432abcc16cb..dd15d5d8bb4e 100644 --- a/packages/SystemUI/res/xml/media_expanded.xml +++ b/packages/SystemUI/res/xml/media_expanded.xml @@ -31,12 +31,12 @@ android:id="@+id/app_name" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginEnd="10dp" + android:layout_marginEnd="@dimen/qs_center_guideline_padding" android:layout_marginStart="10dp" android:layout_marginTop="20dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toEndOf="@id/icon" - app:layout_constraintEnd_toStartOf="@id/media_seamless_barrier" + app:layout_constraintEnd_toStartOf="@id/center_vertical_guideline" app:layout_constraintHorizontal_bias="0" /> @@ -46,9 +46,12 @@ android:layout_height="wrap_content" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toEndOf="@id/center_vertical_guideline" + app:layout_constraintHorizontal_bias="1" app:layout_constraintWidth_min="60dp" android:layout_marginTop="@dimen/qs_media_panel_outer_padding" android:layout_marginEnd="@dimen/qs_media_panel_outer_padding" + android:layout_marginStart="@dimen/qs_center_guideline_padding" /> <Constraint @@ -57,10 +60,13 @@ android:layout_height="@dimen/qs_seamless_fallback_icon_size" android:layout_marginTop="@dimen/qs_seamless_fallback_top_margin" android:layout_marginEnd="@dimen/qs_seamless_fallback_end_margin" + android:layout_marginStart="@dimen/qs_center_guideline_padding" android:alpha="0.5" android:visibility="gone" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toEndOf="@id/center_vertical_guideline" + app:layout_constraintHorizontal_bias="1" /> <Constraint |