diff options
author | Alan Viverette <alanv@google.com> | 2014-10-30 13:51:21 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2014-10-30 13:51:21 -0700 |
commit | 35c3cb6a598d2868db064a2dcd6f3b7031fe9f0a (patch) | |
tree | b9cf5d1f75103858bd2fd5a3efcf8231e9b3f2b4 /core/java/com | |
parent | fc2b9039b87afd3067f563a9bf59504a8bdf8a87 (diff) | |
download | frameworks_base-35c3cb6a598d2868db064a2dcd6f3b7031fe9f0a.zip frameworks_base-35c3cb6a598d2868db064a2dcd6f3b7031fe9f0a.tar.gz frameworks_base-35c3cb6a598d2868db064a2dcd6f3b7031fe9f0a.tar.bz2 |
Remove scroll view from correct parent in AlertController
BUG: 18191700
Change-Id: I37602fc26d103b76021f00c58f03bc32d7a978fe
Diffstat (limited to 'core/java/com')
-rw-r--r-- | core/java/com/android/internal/app/AlertController.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java index 3630cc7..35e03c3 100644 --- a/core/java/com/android/internal/app/AlertController.java +++ b/core/java/com/android/internal/app/AlertController.java @@ -37,6 +37,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; +import android.view.ViewParent; import android.view.ViewTreeObserver; import android.view.Window; import android.view.WindowInsets; @@ -589,9 +590,10 @@ public class AlertController { mScrollView.removeView(mMessageView); if (mListView != null) { - final int childIndex = mScrollView.indexOfChild(mScrollView); - contentPanel.removeViewAt(childIndex); - contentPanel.addView(mListView, childIndex, + final ViewGroup scrollParent = (ViewGroup) mScrollView.getParent(); + final int childIndex = scrollParent.indexOfChild(mScrollView); + scrollParent.removeViewAt(childIndex); + scrollParent.addView(mListView, childIndex, new LayoutParams(MATCH_PARENT, MATCH_PARENT)); } else { contentPanel.setVisibility(View.GONE); |