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

Commit b74d629e authored by Anton Potapov's avatar Anton Potapov Committed by Automerger Merge Worker
Browse files

Merge "Add onRtlPropertiesChanged if layoutDirection changes during...

Merge "Add onRtlPropertiesChanged if layoutDirection changes during resolveLayoutDirection" into udc-qpr-dev am: 7bd60547

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24111952



Change-Id: Ifc69ad6369721bd3a81badc8ba75b9e328b5bba8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9e14552d 7bd60547
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -30,12 +30,11 @@
        android:visibility="gone"
        android:visibility="gone"
    />
    />


    <ImageView
    <com.android.systemui.qs.tileimpl.ChevronImageView
        android:id="@+id/chevron"
        android:id="@+id/chevron"
        android:layout_width="@dimen/qs_icon_size"
        android:layout_width="@dimen/qs_icon_size"
        android:layout_height="@dimen/qs_icon_size"
        android:layout_height="@dimen/qs_icon_size"
        android:src="@*android:drawable/ic_chevron_end"
        android:src="@*android:drawable/ic_chevron_end"
        android:autoMirrored="true"
        android:visibility="gone"
        android:visibility="gone"
        android:importantForAccessibility="no"
        android:importantForAccessibility="no"
    />
    />
+33 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2023 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.qs.tileimpl

import android.content.Context
import android.util.AttributeSet
import android.widget.ImageView

class ChevronImageView(context: Context, attrs: AttributeSet?) : ImageView(context, attrs) {

    override fun resolveLayoutDirection(): Boolean {
        val previousLayoutDirection = layoutDirection
        return super.resolveLayoutDirection().also { resolved ->
            if (resolved && layoutDirection != previousLayoutDirection) {
                onRtlPropertiesChanged(layoutDirection)
            }
        }
    }
}