private void SetValues() { _progressBar.SmoothProgressDrawableSpeed = _speed; _progressBar.SmoothProgressDrawableSectionsCount = _sectionsCount; _progressBar.SmoothProgressDrawableSeparatorLength = DpToPx(_separatorLength); _progressBar.SmoothProgressDrawableStrokeWidth = DpToPx(_strokeWidth); _progressBar.SmoothProgressDrawableReversed = _checkBoxReversed.Checked; _progressBar.SmoothProgressDrawableMirrorMode = _checkBoxMirror.Checked; IInterpolator interpolator; switch (_spinnerInterpolators.SelectedItemPosition) { case 1: interpolator = new LinearInterpolator(); break; case 2: interpolator = new AccelerateDecelerateInterpolator(); break; case 3: interpolator = new DecelerateInterpolator(); break; default: interpolator = new AccelerateInterpolator(); break; } _progressBar.SmoothProgressDrawableInterpolator = interpolator; _progressBar.SmoothProgressDrawableColors = IntsToColors(Resources.GetIntArray(Resource.Array.colors)); }
void SetInterpolator(int position) { IInterpolator CurrentInterpolator; switch (position) { case 1: CurrentInterpolator = new LinearInterpolator(); _seekBarFactor.Enabled=false; break; case 2: CurrentInterpolator = new AccelerateDecelerateInterpolator(); _seekBarFactor.Enabled=false; break; case 3: CurrentInterpolator = new DecelerateInterpolator(_factor); _seekBarFactor.Enabled=true; break; case 0: default: CurrentInterpolator = new AccelerateInterpolator(_factor); _seekBarFactor.Enabled=true; break; } _progressBar.SetSmoothProgressDrawableInterpolator(CurrentInterpolator); _progressBar.SetSmoothProgressDrawableColors(Resources.GetIntArray(Resource.Array.gplus_colors)); }