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

Commit a423f503 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix bug #8913650 spinner...

Fix bug #8913650 spinner dropdown(android.R.layout.simple_spinner_dropdown_item) random alignment on RTL.

- add missing assignment for text direction (mTextDir)
- when layout direction change, update text direction (mTextDir again)

Change-Id: Id600fb0c5897a0d2ee5f9fe18a63437dc3e528d9
parent 366b97ba
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -6198,7 +6198,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        BoringLayout.Metrics hintBoring = UNKNOWN_BORING;

        if (mTextDir == null) {
            getTextDirectionHeuristic();
            mTextDir = getTextDirectionHeuristic();
        }

        int des = -1;
@@ -8541,6 +8541,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        return mEditor.mInBatchEditControllers;
    }

    @Override
    public void onRtlPropertiesChanged(int layoutDirection) {
        super.onRtlPropertiesChanged(layoutDirection);

        mTextDir = getTextDirectionHeuristic();
    }

    TextDirectionHeuristic getTextDirectionHeuristic() {
        if (hasPasswordTransformationMethod()) {
            // passwords fields should be LTR