diff options
| author | 2010-01-19 17:34:10 -0800 | |
|---|---|---|
| committer | 2010-01-19 17:34:10 -0800 | |
| commit | 2d51bff2b6597804307d8883a071ff18adc2644a (patch) | |
| tree | 3a135934bc1d6e68cc19285908c617bd265b4c53 | |
| parent | 5dbe0c753a3fd9003a8bb89179052340bbb4ad2c (diff) | |
Dpad based scrolling in ListView was mishandling the recycler:
recyclable views were removed instead of detached and non-recyclables views
were detached instead of removed.
| -rw-r--r-- | core/java/android/widget/ListView.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index c63774ab8a27..401e7ff47c46 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -2781,10 +2781,10 @@ public class ListView extends AbsListView { while (first.getBottom() < listTop) { AbsListView.LayoutParams layoutParams = (LayoutParams) first.getLayoutParams(); if (recycleBin.shouldRecycleViewType(layoutParams.viewType)) { - removeViewInLayout(first); + detachViewFromParent(first); recycleBin.addScrapView(first); } else { - detachViewFromParent(first); + removeViewInLayout(first); } first = getChildAt(0); mFirstPosition++; @@ -2812,10 +2812,10 @@ public class ListView extends AbsListView { while (last.getTop() > listBottom) { AbsListView.LayoutParams layoutParams = (LayoutParams) last.getLayoutParams(); if (recycleBin.shouldRecycleViewType(layoutParams.viewType)) { - removeViewInLayout(last); + detachViewFromParent(last); recycleBin.addScrapView(last); } else { - detachViewFromParent(last); + removeViewInLayout(last); } last = getChildAt(--lastIndex); } |