diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2012-07-30 14:06:58 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2012-07-30 14:06:58 -0700 |
commit | bf0bc63defd8bb76278ecb1df5ebf5272fd00047 (patch) | |
tree | 4cf01d5d45f8d553f76d57e9063a07b9c3917d46 /core/java | |
parent | d395ea124be07cab29eb7ee72526dbe79daa634d (diff) | |
download | frameworks_base-bf0bc63defd8bb76278ecb1df5ebf5272fd00047.zip frameworks_base-bf0bc63defd8bb76278ecb1df5ebf5272fd00047.tar.gz frameworks_base-bf0bc63defd8bb76278ecb1df5ebf5272fd00047.tar.bz2 |
Improve Toast RTL support
- use Locale from Context
Change-Id: Ic93bb6e3f9310d54d879c20754c9310154940565
Diffstat (limited to 'core/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) { |