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

Commit 2c915b99 authored by Roozbeh Pournader's avatar Roozbeh Pournader Committed by android-build-merger
Browse files

Merge "Invalidate TextView after locale change" into nyc-dev

am: 1a08865d

* commit '1a08865d':
  Invalidate TextView after locale change

Change-Id: Ic3c82bd2fc0553354e1ea8fc9cfcda7a3d565fc0
parents e6dc55c3 1a08865d
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -2893,6 +2893,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    public void setTextLocale(@NonNull Locale locale) {
        mLocalesChanged = true;
        mTextPaint.setTextLocale(locale);
        if (mLayout != null) {
            nullLayouts();
            requestLayout();
            invalidate();
        }
    }

    /**
@@ -2909,6 +2914,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    public void setTextLocales(@NonNull @Size(min=1) LocaleList locales) {
        mLocalesChanged = true;
        mTextPaint.setTextLocales(locales);
        if (mLayout != null) {
            nullLayouts();
            requestLayout();
            invalidate();
        }
    }

    @Override
@@ -2916,6 +2926,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        super.onConfigurationChanged(newConfig);
        if (!mLocalesChanged) {
            mTextPaint.setTextLocales(LocaleList.getDefault());
            if (mLayout != null) {
                nullLayouts();
                requestLayout();
                invalidate();
            }
        }
    }