blob: de9ef218083b79fee0799ce24438238e5ea3e1e9 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2020 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
-->
<!-- Layout for media controls on the lockscreen -->
<com.android.systemui.statusbar.notification.stack.MediaHeaderView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="0dp"
android:paddingEnd="0dp"
android:focusable="true"
android:clickable="true"
>
<!-- Background views required by ActivatableNotificationView. -->
<com.android.systemui.statusbar.notification.row.NotificationBackgroundView
android:id="@+id/backgroundNormal"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<com.android.systemui.statusbar.notification.row.NotificationBackgroundView
android:id="@+id/backgroundDimmed"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<com.android.systemui.statusbar.notification.FakeShadowView
android:id="@+id/fake_shadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<!-- Layout for media controls. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keyguard_media_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:padding="16dp"
>
<ImageView
android:id="@+id/album_art"
android:layout_width="@dimen/qs_media_album_size"
android:layout_height="@dimen/qs_media_album_size"
android:layout_marginRight="16dp"
android:layout_weight="0"
/>
<!-- Media information -->
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
>
<com.android.internal.widget.CachingIconView
android:id="@+id/icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="5dp"
/>
<TextView
android:id="@+id/app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:singleLine="true"
/>
</LinearLayout>
<!-- Song name -->
<TextView
android:id="@+id/header_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
android:textSize="18sp"
android:paddingBottom="6dp"
android:gravity="center"/>
<!-- Artist name -->
<TextView
android:id="@+id/header_artist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@*android:string/config_bodyFontFamily"
android:textSize="14sp"
android:singleLine="true"
/>
</LinearLayout>
<!-- Controls -->
<LinearLayout
android:id="@+id/media_actions"
android:orientation="horizontal"
android:layoutDirection="ltr"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:layout_gravity="center"
>
<ImageButton
style="@android:style/Widget.Material.Button.Borderless.Small"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:visibility="gone"
android:id="@+id/action0"
/>
<ImageButton
style="@android:style/Widget.Material.Button.Borderless.Small"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:visibility="gone"
android:id="@+id/action1"
/>
<ImageButton
style="@android:style/Widget.Material.Button.Borderless.Small"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:visibility="gone"
android:id="@+id/action2"
/>
</LinearLayout>
</LinearLayout>
</com.android.systemui.statusbar.notification.stack.MediaHeaderView>