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

Commit 43404b8f authored by Michael Mikhail's avatar Michael Mikhail
Browse files

Fix volume dialog ringer drawer rtl expansion

Flag: EXEMPT BUGFIX
Fixes: 443643390
Test: Checked UI - expand/collapse on landscape mode.
Change-Id: Ib7f0e0447c9d47f753969cb456ef381fa400fbac
parent 16a5642c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -43,9 +43,9 @@
        android:layout_marginBottom="@dimen/volume_dialog_components_spacing"
        android:clipChildren="false"
        app:layout_constraintBottom_toTopOf="@id/volume_dialog_main_slider_container"
        app:layout_constraintEnd_toEndOf="@id/volume_dialog_background"
        app:layout_constraintRight_toRightOf="@id/volume_dialog_background"
        app:layout_constraintHeight_default="spread"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_default="spread">

@@ -74,9 +74,9 @@
        android:clipChildren="false"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="@id/volume_dialog_background"
        app:layout_constraintRight_toRightOf="@id/volume_dialog_background"
        app:layout_constraintHeight_default="wrap"
        app:layout_constraintStart_toStartOf="@id/volume_dialog_background"
        app:layout_constraintLeft_toLeftOf="@id/volume_dialog_background"
        app:layout_constraintTop_toBottomOf="@id/volume_dialog_main_slider_container"
        app:layout_constraintVertical_bias="0"
        app:layout_constraintWidth_default="wrap">
+11 −11
Original line number Diff line number Diff line
@@ -59,10 +59,10 @@ private fun ConstraintSet.setButtonPositionPortraitConstraints(
            ConstraintSet.TOP,
        )
    }
    connect(button.id, ConstraintSet.END, motionLayout.id, ConstraintSet.END)
    connect(button.id, ConstraintSet.RIGHT, motionLayout.id, ConstraintSet.RIGHT)
    setMargin(
        button.id,
        ConstraintSet.END,
        ConstraintSet.RIGHT,
        motionLayout.context.resources.getDimensionPixelSize(
            R.dimen.volume_dialog_background_margin
        ),
@@ -75,10 +75,10 @@ private fun ConstraintSet.setButtonPositionLandscapeConstraints(
    button: View,
) {
    if (motionLayout.getChildAt(index + 1) == null) {
        connect(button.id, ConstraintSet.END, motionLayout.id, ConstraintSet.END)
        connect(button.id, ConstraintSet.RIGHT, motionLayout.id, ConstraintSet.RIGHT)
        setMargin(
            button.id,
            ConstraintSet.END,
            ConstraintSet.RIGHT,
            motionLayout.context.resources.getDimensionPixelSize(
                R.dimen.volume_dialog_background_margin
            ),
@@ -86,16 +86,16 @@ private fun ConstraintSet.setButtonPositionLandscapeConstraints(
    } else {
        connect(
            button.id,
            ConstraintSet.END,
            ConstraintSet.RIGHT,
            motionLayout.getChildAt(index + 1).id,
            ConstraintSet.START,
            ConstraintSet.LEFT,
        )
    }
    connect(button.id, ConstraintSet.BOTTOM, motionLayout.id, ConstraintSet.BOTTOM)

    // Index 1 is the first button in the children of motionLayout.
    if (index == 1) {
        clear(button.id, ConstraintSet.START)
        clear(button.id, ConstraintSet.LEFT)
    }
}

@@ -165,7 +165,7 @@ private fun ConstraintSet.adjustOpenConstraintsForDrawer(
                },
            )
            connect(view.id, ConstraintSet.BOTTOM, motionLayout.id, ConstraintSet.BOTTOM)
            connect(view.id, ConstraintSet.END, motionLayout.id, ConstraintSet.END)
            connect(view.id, ConstraintSet.RIGHT, motionLayout.id, ConstraintSet.RIGHT)
            setMargin(
                view.id,
                ConstraintSet.BOTTOM,
@@ -200,7 +200,7 @@ private fun ConstraintSet.adjustClosedConstraintsForDrawer(
                                .toInt(),
                        )
                    } else {
                        connect(view.id, ConstraintSet.END, motionLayout.id, ConstraintSet.END)
                        connect(view.id, ConstraintSet.RIGHT, motionLayout.id, ConstraintSet.RIGHT)
                        setAlpha(view.id, 1.0F)
                        constrainWidth(
                            view.id,
@@ -210,7 +210,7 @@ private fun ConstraintSet.adjustClosedConstraintsForDrawer(
                        )
                        setMargin(
                            view.id,
                            ConstraintSet.END,
                            ConstraintSet.RIGHT,
                            motionLayout.context.resources.getDimensionPixelSize(
                                R.dimen.volume_dialog_background_margin
                            ),
@@ -264,7 +264,7 @@ private fun ConstraintSet.adjustClosedConstraintsForDrawer(
                motionLayout.context.resources.getDimensionPixelSize(R.dimen.volume_dialog_width),
            )
            connect(view.id, ConstraintSet.BOTTOM, motionLayout.id, ConstraintSet.BOTTOM)
            connect(view.id, ConstraintSet.END, motionLayout.id, ConstraintSet.END)
            connect(view.id, ConstraintSet.RIGHT, motionLayout.id, ConstraintSet.RIGHT)
            setMargin(
                view.id,
                ConstraintSet.BOTTOM,