frameworks/base/packages/SystemUI/res/layout/media_smartspace_recommenda...

137 lines
5.2 KiB
XML
Raw Permalink Normal View History

2025-08-25 08:17:13 +08:00
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2019 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 recommendations inside QSPanel carousel -->
<!-- See media_recommendation_expanded.xml and media_recommendation_collapsed.xml for the
constraints. -->
<com.android.systemui.util.animation.TransitionLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/media_recommendations"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false"
android:forceHasOverlappingRendering="false"
android:background="@drawable/qs_media_background"
android:theme="@style/MediaPlayer">
<!-- This view just ensures the full media player is a certain height. -->
<View
android:id="@+id/sizing_view"
android:layout_width="match_parent"
android:layout_height="@dimen/qs_media_session_height_expanded" />
<com.android.internal.widget.CachingIconView
android:id="@+id/recommendation_card_icon"
android:layout_width="@dimen/qs_media_app_icon_size"
android:layout_height="@dimen/qs_media_app_icon_size"
android:minWidth="@dimen/qs_media_app_icon_size"
android:minHeight="@dimen/qs_media_app_icon_size"
android:layout_marginStart="@dimen/qs_media_padding"
android:layout_marginTop="@dimen/qs_media_rec_icon_top_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<FrameLayout
android:id="@+id/media_cover1_container"
style="@style/MediaPlayer.Recommendation.AlbumContainer"
>
<ImageView
android:id="@+id/media_cover1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="@dimen/qs_media_rec_album_size"
android:minHeight="@dimen/qs_media_rec_album_size"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:adjustViewBounds="true"
android:background="@drawable/bg_smartspace_media_item"
style="@style/MediaPlayer.Recommendation.Album"
android:clipToOutline="true"
android:scaleType="centerCrop"/>
</FrameLayout>
<TextView
android:id="@+id/media_title1"
style="@style/MediaPlayer.Recommendation.Text.Title"
/>
<TextView
android:id="@+id/media_subtitle1"
style="@style/MediaPlayer.Recommendation.Text.Subtitle"
/>
<FrameLayout
android:id="@+id/media_cover2_container"
style="@style/MediaPlayer.Recommendation.AlbumContainer"
>
<ImageView
android:id="@+id/media_cover2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="@dimen/qs_media_rec_album_size"
android:minHeight="@dimen/qs_media_rec_album_size"
android:adjustViewBounds="true"
android:background="@drawable/bg_smartspace_media_item"
style="@style/MediaPlayer.Recommendation.Album"
android:clipToOutline="true"
android:scaleType="centerCrop"/>
</FrameLayout>
<TextView
android:id="@+id/media_title2"
style="@style/MediaPlayer.Recommendation.Text.Title"
/>
<TextView
android:id="@+id/media_subtitle2"
style="@style/MediaPlayer.Recommendation.Text.Subtitle"
/>
<FrameLayout
android:id="@+id/media_cover3_container"
style="@style/MediaPlayer.Recommendation.AlbumContainer"
>
<ImageView
android:id="@+id/media_cover3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="@dimen/qs_media_rec_album_size"
android:minHeight="@dimen/qs_media_rec_album_size"
android:adjustViewBounds="true"
android:background="@drawable/bg_smartspace_media_item"
style="@style/MediaPlayer.Recommendation.Album"
android:clipToOutline="true"
android:scaleType="centerCrop"/>
</FrameLayout>
<TextView
android:id="@+id/media_title3"
style="@style/MediaPlayer.Recommendation.Text.Title"
/>
<TextView
android:id="@+id/media_subtitle3"
style="@style/MediaPlayer.Recommendation.Text.Subtitle"
/>
<include
layout="@layout/media_long_press_menu" />
</com.android.systemui.util.animation.TransitionLayout>