Merge "Fix ListView losing scroll position" into nyc-dev am: adde076
am: c3176ea
* commit 'c3176ea42b29335cc0dab3f8d078ade6135420da':
Fix ListView losing scroll position
Change-Id: I38985033f62a826b72af80cc1f9a303b23a9a456
This commit is contained in:
@@ -356,10 +356,18 @@ public abstract class AbsSpinner extends AdapterView<SpinnerAdapter> {
|
|||||||
return mFirstPosition + i;
|
return mFirstPosition + i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return INVALID_POSITION;
|
return INVALID_POSITION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
|
||||||
|
super.dispatchRestoreInstanceState(container);
|
||||||
|
// Restores the selected position when Spinner gets restored,
|
||||||
|
// rather than wait until the next measure/layout pass to do it.
|
||||||
|
handleDataChanged();
|
||||||
|
}
|
||||||
|
|
||||||
static class SavedState extends BaseSavedState {
|
static class SavedState extends BaseSavedState {
|
||||||
long selectedId;
|
long selectedId;
|
||||||
int position;
|
int position;
|
||||||
|
|||||||
@@ -815,7 +815,6 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
|
|||||||
@Override
|
@Override
|
||||||
protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
|
protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
|
||||||
dispatchThawSelfOnly(container);
|
dispatchThawSelfOnly(container);
|
||||||
handleDataChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class AdapterDataSetObserver extends DataSetObserver {
|
class AdapterDataSetObserver extends DataSetObserver {
|
||||||
|
|||||||
Reference in New Issue
Block a user