Adjust the number of recommendations according to display size
We currently have 3 recommendations to show in the card. When the
display size gets bigger, the 3 recommendation covers cannot fit in the
media carousel. So we calculate the width of the screen compared to the
the default width of media controls. Then we get min(3, available width / cover)
as the number of recommendations that can be visibile.
Added changes to title/subtitle visibility that were missing from
collapsed layout.
Bug: 267295550
Test: atest MediaControlPanelTest
Test: checked recommendation card in both expanded and collapsed
layouts. And tried all combinations of display/text sizes.
Change-Id: Ic047c020fd91f9ed835619fe14748a7a40132798
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 082f385..1602189 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -64,6 +64,10 @@
<!-- The number of rows in the QuickSettings -->
<integer name="quick_settings_max_rows">4</integer>
+ <!-- If the dp width of the available space is <= this value, potentially adjust the number
+ of media recommendation items-->
+ <integer name="default_qs_media_rec_width_dp">380</integer>
+
<!-- The number of columns that the top level tiles span in the QuickSettings -->
<!-- The default tiles to display in QuickSettings -->