Beispiel #1
0
 // Great way to save a view's state
 // http://stackoverflow.com/a/7089687/1991053
 @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;
 }