protected override void OnRestoreInstanceState(Android.OS.IParcelable state) { if (state is Bundle) { Bundle bundle = (Bundle)state; SetProgress(bundle.GetFloat("progress")); SetMarkerProgress(bundle.GetFloat("marker_progress")); int progressColor = bundle.GetInt("progress_color"); if (progressColor != _progressColor) { _progressColor = progressColor; UpdateProgressColor(); } int progressBackgroundColor = bundle.GetInt("progress_background_color"); if (progressBackgroundColor != _progressBackgroundColor) { _progressBackgroundColor = progressBackgroundColor; UpdateBackgroundColor(); } _isThumbEnabled = bundle.GetBoolean("thumb_visible"); _isMarkerEnabled = bundle.GetBoolean("marker_visible"); base.OnRestoreInstanceState((IParcelable)bundle.GetParcelable("saved_state")); return; } base.OnRestoreInstanceState(state); }
protected override void OnRestoreInstanceState(Android.OS.IParcelable state) { base.OnRestoreInstanceState(state); SavedState savedState = (SavedState)state; currentPage = savedState.CurrentPage; RequestLayout(); }