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

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

Improve Toast RTL support

- use Locale from Context

Change-Id: Ic93bb6e3f9310d54d879c20754c9310154940565
parent d395ea12
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -376,8 +376,8 @@ public class Toast {
                mWM = WindowManagerImpl.getDefault();
                // We can resolve the Gravity here by using the Locale for getting
                // the layout direction
                final int layoutDirection = LocaleUtil.getLayoutDirectionFromLocale(
                        Locale.getDefault());
                final Locale locale = mView.getContext().getResources().getConfiguration().locale;
                final int layoutDirection = LocaleUtil.getLayoutDirectionFromLocale(locale);
                final int gravity = Gravity.getAbsoluteGravity(mGravity, layoutDirection);
                mParams.gravity = gravity;
                if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL) {