am 0f4739f7: Merge "Fix bug 5186258 - Incorrect window width is used for custom panel views in the MATCH_PARENT case"

* commit '0f4739f7d0d121e9cd07dd556d227f878f7bed0f':
  Fix bug 5186258 - Incorrect window width is used for custom panel views in the MATCH_PARENT case
This commit is contained in:
Adam Powell
2011-08-18 18:54:35 -07:00
committed by Android Git Automerger

View File

@@ -587,6 +587,13 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
}
} else if (!st.isInListMode()) {
width = MATCH_PARENT;
} else if (st.createdPanelView != null) {
// If we already had a panel view, carry width=MATCH_PARENT through
// as we did above when it was created.
ViewGroup.LayoutParams lp = st.createdPanelView.getLayoutParams();
if (lp != null && lp.width == ViewGroup.LayoutParams.MATCH_PARENT) {
width = MATCH_PARENT;
}
}
st.isOpen = true;