We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d395ea1 commit bf0bc63Copy full SHA for bf0bc63
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