Skip to content
Browse files

Moved the public method to the top, just because.

  • Loading branch information...
1 parent 12d1658 commit 1abe8f5e1bfa0183e16027a2482a12e23b3e7dd3 @roughike committed
Showing with 27 additions and 27 deletions.
  1. +27 −27 swipe-selector/src/main/java/com/roughike/swipeselector/SwipeSelector.java
View
54 swipe-selector/src/main/java/com/roughike/swipeselector/SwipeSelector.java
@@ -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

Please sign in to comment.
Something went wrong with that request. Please try again.