|
@@ -160,33 +160,6 @@ public SwipeItem getSelectedItem() { |
|
|
return mAdapter.getSelectedItem();
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public Parcelable onSaveInstanceState() {
|
|
|
- Bundle bundle = mAdapter.onSaveInstanceState();
|
|
|
- bundle.putParcelable(STATE_SELECTOR, super.onSaveInstanceState());
|
|
|
- return bundle;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onRestoreInstanceState(Parcelable state) {
|
|
|
- if (state instanceof Bundle) {//Shouldn't be needed, just in case
|
|
|
- Bundle bundle = (Bundle) state;
|
|
|
- mAdapter.onRestoreInstanceState(bundle);
|
|
|
- state = bundle.getParcelable(STATE_SELECTOR);
|
|
|
- }
|
|
|
- super.onRestoreInstanceState(state);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) {
|
|
|
- dispatchFreezeSelfOnly(container);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
|
|
|
- dispatchThawSelfOnly(container);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Select an item at the specified position and animate the change.
|
|
|
*
|
|
@@ -252,4 +225,31 @@ public void selectItemWithValue(Object value) { |
|
|
public void selectItemWithValue(Object value, boolean animate) {
|
|
|
mAdapter.selectItemWithValue(value, animate);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Parcelable onSaveInstanceState() {
|
|
|
+ Bundle bundle = mAdapter.onSaveInstanceState();
|
|
|
+ bundle.putParcelable(STATE_SELECTOR, super.onSaveInstanceState());
|
|
|
+ return bundle;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onRestoreInstanceState(Parcelable state) {
|
|
|
+ if (state instanceof Bundle) {//Shouldn't be needed, just in case
|
|
|
+ Bundle bundle = (Bundle) state;
|
|
|
+ mAdapter.onRestoreInstanceState(bundle);
|
|
|
+ state = bundle.getParcelable(STATE_SELECTOR);
|
|
|
+ }
|
|
|
+ super.onRestoreInstanceState(state);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) {
|
|
|
+ dispatchFreezeSelfOnly(container);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
|
|
|
+ dispatchThawSelfOnly(container);
|
|
|
+ }
|
|
|
}
|
0 comments on commit
1abe8f5