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

Commit f5d92d84 authored by Cecilia Hong's avatar Cecilia Hong Committed by Android (Google) Code Review
Browse files

Merge "Rename the Smartspace media recommendation layout to avoid potential mismatch." into sc-dev

parents 473d4e11 5b449e1f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
  ~ limitations under the License
  -->

<!-- Layout for media recommendations inside QSPanel carousel -->
<com.android.systemui.util.animation.TransitionLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/media_recommendations"
+20 −1
Original line number Diff line number Diff line
/*
 * 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.
 */

package com.android.systemui.media

import android.view.LayoutInflater
@@ -50,7 +66,10 @@ class RecommendationViewHolder private constructor(itemView: View) {
        @JvmStatic fun create(inflater: LayoutInflater, parent: ViewGroup):
            RecommendationViewHolder {
            val itemView =
                inflater.inflate(R.layout.smartspace_card_media, parent, /* attachToRoot= */ false)
                inflater.inflate(
                    R.layout.media_smartspace_recommendations,
                    parent,
                    false /* attachToRoot */)
            // Because this media view (a TransitionLayout) is used to measure and layout the views
            // in various states before being attached to its parent, we can't depend on the default
            // LAYOUT_DIRECTION_INHERIT to correctly resolve the ltr direction.