am d8989364: am e9a33c60: Merge "Fix bug #7363252 Popup and Dialog UI widgets should be RTL aware" into jb-mr1-dev
* commit 'd89893642f81f854455da601e4735d226cf95214': Fix bug #7363252 Popup and Dialog UI widgets should be RTL aware
This commit is contained in:
@@ -28617,7 +28617,6 @@ package android.widget {
|
||||
method public void setHeight(int);
|
||||
method public void setHorizontalOffset(int);
|
||||
method public void setInputMethodMode(int);
|
||||
method public void setLayoutDirection(int);
|
||||
method public void setListSelector(android.graphics.drawable.Drawable);
|
||||
method public void setModal(boolean);
|
||||
method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener);
|
||||
|
||||
@@ -28619,7 +28619,6 @@ package android.widget {
|
||||
method public void setHeight(int);
|
||||
method public void setHorizontalOffset(int);
|
||||
method public void setInputMethodMode(int);
|
||||
method public void setLayoutDirection(int);
|
||||
method public void setListSelector(android.graphics.drawable.Drawable);
|
||||
method public void setModal(boolean);
|
||||
method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener);
|
||||
|
||||
@@ -1186,6 +1186,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);
|
||||
@@ -2678,7 +2679,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1093,7 +1093,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
||||
mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED);
|
||||
mPopup.setListItemExpandMax(EXPAND_MAX);
|
||||
}
|
||||
mPopup.setLayoutDirection(getLayoutDirection());
|
||||
mPopup.show();
|
||||
mPopup.getListView().setOverScrollMode(View.OVER_SCROLL_ALWAYS);
|
||||
}
|
||||
|
||||
@@ -1021,8 +1021,6 @@ public class ListPopupWindow {
|
||||
mDropDownList.setOnItemSelectedListener(mItemSelectedListener);
|
||||
}
|
||||
|
||||
mDropDownList.setLayoutDirection(mLayoutDirection);
|
||||
|
||||
dropDownView = mDropDownList;
|
||||
|
||||
View hintView = mPromptView;
|
||||
@@ -1131,21 +1129,6 @@ public class ListPopupWindow {
|
||||
return listContent + otherHeights;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the layout direction for this popup. Should be a resolved direction as the
|
||||
* popup as no capacity to do the resolution on his own.
|
||||
*
|
||||
* @param layoutDirection One of {@link View#LAYOUT_DIRECTION_LTR},
|
||||
* {@link View#LAYOUT_DIRECTION_RTL},
|
||||
*
|
||||
*/
|
||||
public void setLayoutDirection(int layoutDirection) {
|
||||
mLayoutDirection = layoutDirection;
|
||||
if (mDropDownList != null) {
|
||||
mDropDownList.setLayoutDirection(mLayoutDirection);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Wrapper class for a ListView. This wrapper can hijack the focus to
|
||||
* make sure the list uses the appropriate drawables and states when
|
||||
|
||||
@@ -2867,8 +2867,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
||||
mDecor = generateDecor();
|
||||
mDecor.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
|
||||
mDecor.setIsRootNamespace(true);
|
||||
mDecor.setLayoutDirection(
|
||||
getContext().getResources().getConfiguration().getLayoutDirection());
|
||||
if (!mInvalidatePanelMenuPosted && mInvalidatePanelMenuFeatures != 0) {
|
||||
mDecor.postOnAnimation(mInvalidatePanelMenuRunnable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user