Skip to content

Commit

Permalink
removed state saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Kwiecień committed Jun 16, 2015
1 parent 30b697a commit 918b1c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 11
targetSdkVersion 22
versionCode 9
versionName "1.0.9"
versionCode 10
versionName "1.0.10"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.animation.ObjectAnimator;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
Expand Down Expand Up @@ -85,23 +84,4 @@ public void setAnimationDuration(long animationDuration) {
this.animationDuration = animationDuration;
}

@Override
public Parcelable onSaveInstanceState() {
Bundle outState = new Bundle();
outState.putFloat(PREVIOUS_VALUE, previousValue);
outState.putParcelable(FORMATTER, formatter);
outState.putParcelable(STATE, super.onSaveInstanceState());
return outState;
}

@Override
public void onRestoreInstanceState(Parcelable state) {
Bundle bundle = (Bundle) state;
previousValue = ((Bundle) state).getFloat(PREVIOUS_VALUE);
formatter = ((Bundle) state).getParcelable(FORMATTER);
super.onRestoreInstanceState(bundle.getParcelable(STATE));

if (previousValue != 0f) setValue(previousValue);
}

}

0 comments on commit 918b1c2

Please sign in to comment.