diff options
| author | Adam Powell <adamp@google.com> | 2010-12-10 13:20:28 -0800 |
|---|---|---|
| committer | Adam Powell <adamp@google.com> | 2010-12-10 13:20:32 -0800 |
| commit | 22e92e55576e2c723c320824de08d78326379aeb (patch) | |
| tree | 7ee6f5732d22710859416a5cbe8dbfcf62d25814 /core/java/android/widget/Spinner.java | |
| parent | 134d323871fdd1b7bd258153acfd61f7db9edadb (diff) | |
Fix bug 3257463 - Yes, we SHOULD put the child in the recycler.
This caused an issue where a LinearLayout measuring for the baseline
could cause the fake view for position 0 to be associated with a
different position in the recycler. It gets used later with the wrong
data; bad times.
Change-Id: If273894d46185a550f4efd9f11ef83e0113f0a3c
Diffstat (limited to 'core/java/android/widget/Spinner.java')
| -rw-r--r-- | core/java/android/widget/Spinner.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java index 006473e0285e..b90837c964e8 100644 --- a/core/java/android/widget/Spinner.java +++ b/core/java/android/widget/Spinner.java @@ -199,7 +199,8 @@ public class Spinner extends AbsSpinner implements OnClickListener { child = getChildAt(0); } else if (mAdapter != null && mAdapter.getCount() > 0) { child = makeAndAddView(0); - // TODO: We should probably put the child in the recycler + mRecycler.put(0, child); + removeAllViewsInLayout(); } if (child != null) { |
