From 5b7117f07df5157c0ed6068905f760afc2846e2d Mon Sep 17 00:00:00 2001 From: Beth Thibodeau Date: Fri, 14 May 2021 19:16:55 -0400 Subject: [PATCH] Update long press layout for large display sizes - Allow text to marquee when too large - Adjust margins for text and buttons - Hide settings button if there is not enough room to display Fixes: 187900686 Fixes: 186756165 Test: visual Change-Id: I3b10fded9f6633d6486c58b3fcebd8006168144d --- .../media_smartspace_recommendations.xml | 60 +++++++++++-------- packages/SystemUI/res/layout/media_view.xml | 57 +++++++++++------- packages/SystemUI/res/values/styles.xml | 2 + .../systemui/media/MediaControlPanel.java | 38 +++++++++++- .../systemui/media/MediaViewController.kt | 8 +++ .../systemui/media/PlayerViewHolder.kt | 7 ++- .../media/RecommendationViewHolder.kt | 6 ++ .../systemui/media/MediaControlPanelTest.kt | 11 +++- 8 files changed, 136 insertions(+), 53 deletions(-) diff --git a/packages/SystemUI/res/layout/media_smartspace_recommendations.xml b/packages/SystemUI/res/layout/media_smartspace_recommendations.xml index 8c54e2c1cec4f..667307d26fa78 100644 --- a/packages/SystemUI/res/layout/media_smartspace_recommendations.xml +++ b/packages/SystemUI/res/layout/media_smartspace_recommendations.xml @@ -159,36 +159,43 @@ + app:layout_constraintBottom_toTopOf="@id/cancel"/> + /> - \ No newline at end of file diff --git a/packages/SystemUI/res/layout/media_view.xml b/packages/SystemUI/res/layout/media_view.xml index e999872ac8057..10bdaaae66343 100644 --- a/packages/SystemUI/res/layout/media_view.xml +++ b/packages/SystemUI/res/layout/media_view.xml @@ -213,36 +213,43 @@ + app:layout_constraintBottom_toTopOf="@id/cancel"/> ?android:attr/textColorPrimary @color/media_player_outline_button_bg @*android:string/config_headlineFontFamilyMedium + center + true