We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 859a62c + bf0bc63 commit 3330ae5Copy full SHA for 3330ae5
core/java/android/widget/Toast.java
@@ -376,8 +376,8 @@ public void handleShow() {
376
mWM = WindowManagerImpl.getDefault();
377
// We can resolve the Gravity here by using the Locale for getting
378
// the layout direction
379
- final int layoutDirection = LocaleUtil.getLayoutDirectionFromLocale(
380
- Locale.getDefault());
+ final Locale locale = mView.getContext().getResources().getConfiguration().locale;
+ final int layoutDirection = LocaleUtil.getLayoutDirectionFromLocale(locale);
381
final int gravity = Gravity.getAbsoluteGravity(mGravity, layoutDirection);
382
mParams.gravity = gravity;
383
if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL) {
0 commit comments