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

Commit 7710f80a authored by Michael Mikhail's avatar Michael Mikhail Committed by Android (Google) Code Review
Browse files

Merge "Remove MEDIA_RECOMMENDATION_CARD_UPDATE flag" into udc-qpr-dev

parents 9fb2833f 65ce87bf
Loading
Loading
Loading
Loading
+0 −136
Original line number Diff line number Diff line
<?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>
+0 −101
Original line number Diff line number Diff line
<?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
  -->
<ConstraintSet
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto" >

    <Constraint
        android:id="@+id/sizing_view"
        android:layout_width="match_parent"
        android:layout_height="@dimen/qs_media_session_height_collapsed"
        />

    <!-- Only the constraintBottom and marginBottom are different. The rest of the constraints are
         the same as the constraints in media_recommendations_expanded.xml. But, due to how
         ConstraintSets work, all the constraints need to be in the same place. So, the shared
         constraints can't be put in the shared layout file media_smartspace_recommendations.xml and
         the constraints are instead duplicated between here and media_recommendations_expanded.xml.
         Ditto for the other cover containers. -->
    <Constraint
        android:id="@+id/media_cover1_container"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="@dimen/qs_media_padding"
        style="@style/MediaPlayer.Recommendation.AlbumContainer"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@id/media_cover2_container"
        android:layout_marginEnd="@dimen/qs_media_rec_album_side_margin"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintHorizontal_bias="1.0"
        app:layout_constraintVertical_bias="0.5"
        />

    <Constraint
        android:id="@+id/media_title1"
        android:visibility="gone"
        />

    <Constraint
        android:id="@+id/media_subtitle1"
        android:visibility="gone"
        />

    <Constraint
        android:id="@+id/media_cover2_container"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="@dimen/qs_media_padding"
        style="@style/MediaPlayer.Recommendation.AlbumContainer"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toEndOf="@id/media_cover1_container"
        app:layout_constraintEnd_toStartOf="@id/media_cover3_container"
        android:layout_marginEnd="@dimen/qs_media_rec_album_side_margin"
        app:layout_constraintVertical_bias="0.5"
        />

    <Constraint
        android:id="@+id/media_title2"
        android:visibility="gone"
        />

    <Constraint
        android:id="@+id/media_subtitle2"
        android:visibility="gone"
        />

    <Constraint
        android:id="@+id/media_cover3_container"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="@dimen/qs_media_padding"
        style="@style/MediaPlayer.Recommendation.AlbumContainer"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toEndOf="@id/media_cover2_container"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginEnd="@dimen/qs_media_padding"
        app:layout_constraintVertical_bias="0.5"
        />

    <Constraint
        android:id="@+id/media_title3"
        android:visibility="gone"
        />

    <Constraint
        android:id="@+id/media_subtitle3"
        android:visibility="gone"
        />

</ConstraintSet>
+0 −123
Original line number Diff line number Diff line
<?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
  -->
<ConstraintSet
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    >

    <Constraint
        android:id="@+id/sizing_view"
        android:layout_width="match_parent"
        android:layout_height="@dimen/qs_media_session_height_expanded"
        />

    <Constraint
        android:id="@+id/media_cover1_container"
        style="@style/MediaPlayer.Recommendation.AlbumContainer"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toTopOf="@+id/media_title1"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@id/media_cover2_container"
        android:layout_marginEnd="@dimen/qs_media_rec_album_side_margin"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintVertical_chainStyle="packed"
        app:layout_constraintHorizontal_bias="1.0"
        app:layout_constraintVertical_bias="0.4"
        />

    <Constraint
        android:id="@+id/media_title1"
        style="@style/MediaPlayer.Recommendation.Text.Title"
        app:layout_constraintStart_toStartOf="@+id/media_cover1_container"
        app:layout_constraintEnd_toEndOf="@+id/media_cover1_container"
        app:layout_constraintTop_toBottomOf="@+id/media_cover1_container"
        app:layout_constraintBottom_toTopOf="@+id/media_subtitle1"
        />

    <Constraint
        android:id="@+id/media_subtitle1"
        style="@style/MediaPlayer.Recommendation.Text.Subtitle"
        app:layout_constraintStart_toStartOf="@+id/media_cover1_container"
        app:layout_constraintEnd_toEndOf="@+id/media_cover1_container"
        app:layout_constraintTop_toBottomOf="@+id/media_title1"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="@dimen/qs_media_padding"
        />

    <Constraint
        android:id="@+id/media_cover2_container"
        style="@style/MediaPlayer.Recommendation.AlbumContainer"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toTopOf="@id/media_title2"
        app:layout_constraintStart_toEndOf="@id/media_cover1_container"
        app:layout_constraintEnd_toStartOf="@id/media_cover3_container"
        android:layout_marginEnd="@dimen/qs_media_rec_album_side_margin"
        app:layout_constraintVertical_chainStyle="packed"
        app:layout_constraintVertical_bias="0.4"
        />

    <Constraint
        android:id="@+id/media_title2"
        style="@style/MediaPlayer.Recommendation.Text.Title"
        app:layout_constraintStart_toStartOf="@+id/media_cover2_container"
        app:layout_constraintEnd_toEndOf="@+id/media_cover2_container"
        app:layout_constraintTop_toBottomOf="@+id/media_cover2_container"
        app:layout_constraintBottom_toTopOf="@+id/media_subtitle2"
        />

    <Constraint
        android:id="@+id/media_subtitle2"
        style="@style/MediaPlayer.Recommendation.Text.Subtitle"
        app:layout_constraintStart_toStartOf="@+id/media_cover2_container"
        app:layout_constraintEnd_toEndOf="@+id/media_cover2_container"
        app:layout_constraintTop_toBottomOf="@+id/media_title2"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="@dimen/qs_media_padding"
        />

    <Constraint
        android:id="@+id/media_cover3_container"
        style="@style/MediaPlayer.Recommendation.AlbumContainer"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toTopOf="@id/media_title3"
        app:layout_constraintStart_toEndOf="@id/media_cover2_container"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginEnd="@dimen/qs_media_padding"
        app:layout_constraintVertical_chainStyle="packed"
        app:layout_constraintVertical_bias="0.4"
        />

    <Constraint
        android:id="@+id/media_title3"
        style="@style/MediaPlayer.Recommendation.Text.Title"
        app:layout_constraintStart_toStartOf="@+id/media_cover3_container"
        app:layout_constraintEnd_toEndOf="@+id/media_cover3_container"
        app:layout_constraintTop_toBottomOf="@+id/media_cover3_container"
        app:layout_constraintBottom_toTopOf="@+id/media_subtitle3"
        />

    <Constraint
        android:id="@+id/media_subtitle3"
        style="@style/MediaPlayer.Recommendation.Text.Subtitle"
        app:layout_constraintStart_toStartOf="@+id/media_cover3_container"
        app:layout_constraintEnd_toEndOf="@+id/media_cover3_container"
        app:layout_constraintTop_toBottomOf="@+id/media_title3"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="@dimen/qs_media_padding"
        />

</ConstraintSet>
Loading