diff options
| author | Doris Liu <tianliu@google.com> | 2015-09-09 13:59:32 -0700 |
|---|---|---|
| committer | Doris Liu <tianliu@google.com> | 2015-09-11 18:03:28 -0700 |
| commit | b7714ae157407673cff6776f4ad90c183cd78bd6 (patch) | |
| tree | 4fdc622dd23bf5461d0212590266060e8165d308 /core/java/android/widget/AdapterView.java | |
| parent | d82e0d94fc090e93f237613071a1534496116103 (diff) | |
Fix Spinner not restoring selection when set to GONE
This CL restores the selected position when AdapterView
gets restored, rather than wait until the next measure/layout
pass to do it. After the change, even when the AdapterView
is set to GONE (i.e. no measure/layout pass), the selection
will still be kept up to date.
Bug: 23619366
Change-Id: I09a31b6e2a61ca0edf129af8fe634b83784f9167
Diffstat (limited to 'core/java/android/widget/AdapterView.java')
| -rw-r--r-- | core/java/android/widget/AdapterView.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java index 0cc1b25d19b7..27a0f8014dd5 100644 --- a/core/java/android/widget/AdapterView.java +++ b/core/java/android/widget/AdapterView.java @@ -808,6 +808,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { @Override protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) { dispatchThawSelfOnly(container); + handleDataChanged(); } class AdapterDataSetObserver extends DataSetObserver { |
