Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 819ec8ae authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Updated layout for more compact player

- App icon is now on the corner of album art
- Small player is condensed, with smaller art
- No album art will instead show a fallback view with device icon
- Device name shows in output switcher
- Adjusted colors and dimens to match spec
- Fixed bug where too many compact actions could be shown

Test: visual
Test: atest com.android.systemui.media
Bug: 176177555
Bug: 182292357
Change-Id: I56ec5c5f1188f7547b6e74a2f9bf8d1ad2ee21e4
parent d7d47480
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <corners android:radius="@dimen/qs_media_album_radius"/>
</shape>
+29 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        android:shape="rectangle">
        <stroke
            android:color="?androidprv:attr/colorAccentPrimaryVariant"
            android:width="1dp"/>
        <corners android:radius="24dp"/>
        <padding
            android:left="16dp"
            android:right="16dp"
            android:top="8dp"
            android:bottom="8dp" />
</shape>
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <solid android:color="?android:attr/colorBackground" />
    <size
        android:width="20dp"
        android:height="20dp" />
</shape>
+5 −0
Original line number Diff line number Diff line
@@ -20,6 +20,11 @@
        <shape android:shape="rectangle">
            <solid android:color="@color/media_seamless_border" />
            <corners android:radius="24dp"/>
            <padding
                android:left="8dp"
                android:right="8dp"
                android:top="4dp"
                android:bottom="4dp" />
        </shape>
    </item>
</ripple>
 No newline at end of file
+15 −24
Original line number Diff line number Diff line
@@ -89,30 +89,18 @@
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/qs_media_panel_outer_padding"
        android:layout_marginStart="@dimen/qs_media_panel_outer_padding"
        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
        android:id="@+id/recommendation_text"
        android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
        android:textColor="?android:attr/textColorSecondary"
        android:text="@string/controls_media_title"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toTopOf="@id/remove_text"
        app:layout_constraintVertical_chainStyle="spread_inside"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/qs_media_panel_outer_padding"
        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
        android:layout_marginTop="@dimen/qs_media_padding"
        android:layout_marginStart="@dimen/qs_media_padding"
        android:layout_marginEnd="@dimen/qs_media_padding"
        android:id="@+id/remove_text"
        android:fontFamily="@*android:string/config_headlineFontFamily"
        android:singleLine="true"
        android:textColor="?android:attr/textColorPrimary"
        android:text="@string/controls_media_close_session"
        app:layout_constraintTop_toBottomOf="@id/recommendation_text"
        android:gravity="center_horizontal|top"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toTopOf="@id/settings"/>

    <FrameLayout
@@ -120,8 +108,8 @@
        android:background="@drawable/qs_media_light_source"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/qs_media_panel_outer_padding"
        android:paddingBottom="@dimen/qs_media_panel_outer_padding"
        android:layout_marginStart="@dimen/qs_media_padding"
        android:paddingBottom="@dimen/qs_media_padding"
        android:minWidth="48dp"
        android:minHeight="48dp"
        app:layout_constraintBottom_toBottomOf="parent"
@@ -132,6 +120,7 @@
            android:layout_gravity="bottom"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/qs_media_button_background"
            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
            android:textColor="?android:attr/textColorPrimary"
            android:text="@string/controls_media_settings_button" />
@@ -142,8 +131,8 @@
        android:background="@drawable/qs_media_light_source"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
        android:paddingBottom="@dimen/qs_media_panel_outer_padding"
        android:layout_marginEnd="8dp"
        android:paddingBottom="@dimen/qs_media_padding"
        android:minWidth="48dp"
        android:minHeight="48dp"
        app:layout_constraintBottom_toBottomOf="parent"
@@ -153,6 +142,7 @@
            android:layout_gravity="bottom"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/qs_media_button_background"
            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
            android:textColor="?android:attr/textColorPrimary"
            android:text="@string/cancel" />
@@ -163,8 +153,8 @@
        android:background="@drawable/qs_media_light_source"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
        android:paddingBottom="@dimen/qs_media_panel_outer_padding"
        android:layout_marginEnd="@dimen/qs_media_padding"
        android:paddingBottom="@dimen/qs_media_padding"
        android:minWidth="48dp"
        android:minHeight="48dp"
        app:layout_constraintBottom_toBottomOf="parent"
@@ -174,6 +164,7 @@
            android:layout_gravity="bottom"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/qs_media_button_background"
            android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
            android:textColor="?android:attr/textColorPrimary"
            android:text="@string/controls_media_dismiss_button"
Loading