diff options
Diffstat (limited to 'core/java/android/widget/Toast.java')
-rw-r--r-- | core/java/android/widget/Toast.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java index 6fc0773..9e074f0 100644 --- a/core/java/android/widget/Toast.java +++ b/core/java/android/widget/Toast.java @@ -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) { |