diff options
author | Adam Powell <adamp@google.com> | 2011-08-18 18:32:48 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2011-08-18 18:32:48 -0700 |
commit | 3429ff53d0a7dcf019bf076c7a3eeb877a1a2626 (patch) | |
tree | 1ad56bfff9b3b0eb9da06797cb0cfc9d91453d01 /policy | |
parent | a8993e10f9aca690722512d147d2f98ed29a3d75 (diff) | |
download | frameworks_base-3429ff53d0a7dcf019bf076c7a3eeb877a1a2626.zip frameworks_base-3429ff53d0a7dcf019bf076c7a3eeb877a1a2626.tar.gz frameworks_base-3429ff53d0a7dcf019bf076c7a3eeb877a1a2626.tar.bz2 |
Fix bug 5186258 - Incorrect window width is used for custom panel
views in the MATCH_PARENT case
Change-Id: I11c4a58303fa3c4a9f3540908c6409bacd84a35e
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index c580f08..c929bbc 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -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; |