summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-10-30 21:09:18 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-30 21:09:19 +0000
commitafffc5c29adafc6a4c0b33834b2e016be02ee7bd (patch)
tree469426ca3b7f3955a0e37c441a8f70ab9c173d8f
parent4ba4e03e6b8dcb556774b323429f8904676cd615 (diff)
parent35c3cb6a598d2868db064a2dcd6f3b7031fe9f0a (diff)
downloadframeworks_base-afffc5c29adafc6a4c0b33834b2e016be02ee7bd.zip
frameworks_base-afffc5c29adafc6a4c0b33834b2e016be02ee7bd.tar.gz
frameworks_base-afffc5c29adafc6a4c0b33834b2e016be02ee7bd.tar.bz2
Merge "Remove scroll view from correct parent in AlertController" into lmp-mr1-dev
-rw-r--r--core/java/com/android/internal/app/AlertController.java8
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);