@Override public Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();

    WheelSavedState ss = new WheelSavedState(superState);

    // We save everything that can be changed at runtime
    ss.mProgress = this.mProgress;
    ss.mTargetProgress = this.mTargetProgress;
    ss.isSpinning = this.isSpinning;
    ss.spinSpeed = this.spinSpeed;
    ss.barWidth = this.barWidth;
    ss.barColor = this.barColor;
    ss.rimWidth = this.rimWidth;
    ss.rimColor = this.rimColor;
    ss.circleRadius = this.circleRadius;
    ss.linearProgress = this.linearProgress;
    ss.fillRadius = this.fillRadius;

    return ss;
  }
@ Override public Parcelable onSaveInstanceState ( ) { Parcelable superState = super . onSaveInstanceState ( ) ; WheelSavedState ss = new WheelSavedState ( superState ) ; ss . mProgress = this . mProgress ; ss . mTargetProgress = this . mTargetProgress ; ss . isSpinning = this . isSpinning ; ss . spinSpeed = this . spinSpeed ; ss . barWidth = this . barWidth ; ss . barColor = this . barColor ; ss . rimWidth = this . rimWidth ; ss . rimColor = this . rimColor ; ss . circleRadius = this . circleRadius ; ss . linearProgress = this . linearProgress ; ss . fillRadius = this . fillRadius ; return ss ; }
Great way to save a view's state http://stackoverflow.com/a/7089687/1991053