diff options
| author | Fabrice Di Meglio <fdimeglio@google.com> | 2012-10-17 11:18:13 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-17 11:18:13 -0700 |
| commit | e9a33c6098f51c687665adbed799860df2569ad0 (patch) | |
| tree | c6ff0496c5d7b780e1ad92b704bb190c99e199d9 /core/java/android/view | |
| parent | 161cfef36d8fac79f8665ecdb78d3f8f8f5ba5af (diff) | |
| parent | cf12897cf553bfd07734dad3de071915fd21d4eb (diff) | |
| download | frameworks_base-e9a33c6098f51c687665adbed799860df2569ad0.zip frameworks_base-e9a33c6098f51c687665adbed799860df2569ad0.tar.gz frameworks_base-e9a33c6098f51c687665adbed799860df2569ad0.tar.bz2 | |
Merge "Fix bug #7363252 Popup and Dialog UI widgets should be RTL aware" into jb-mr1-dev
Diffstat (limited to 'core/java/android/view')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 91df4b5..7ce3042 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1184,6 +1184,7 @@ public final class ViewRootImpl implements ViewParent, viewVisibilityChanged = false; mLastConfiguration.setTo(host.getResources().getConfiguration()); mLastSystemUiVisibility = mAttachInfo.mSystemUiVisibility; + host.setLayoutDirection(mLastConfiguration.getLayoutDirection()); host.dispatchAttachedToWindow(attachInfo, 0); mFitSystemWindowsInsets.set(mAttachInfo.mContentInsets); host.fitSystemWindows(mFitSystemWindowsInsets); @@ -2676,7 +2677,12 @@ public final class ViewRootImpl implements ViewParent, // the one in them which may be newer. config = mView.getResources().getConfiguration(); if (force || mLastConfiguration.diff(config) != 0) { + final int lastLayoutDirection = mLastConfiguration.getLayoutDirection(); + final int currentLayoutDirection = config.getLayoutDirection(); mLastConfiguration.setTo(config); + if (lastLayoutDirection != currentLayoutDirection) { + mView.setLayoutDirection(currentLayoutDirection); + } mView.dispatchConfigurationChanged(config); } } |
