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
@Override
protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
dispatchThawSelfOnly(container);
+ handleDataChanged();
}
class AdapterDataSetObserver extends DataSetObserver {