use of fr.castorflex.android.circularprogressbar.CircularProgressDrawable in project SmoothProgressBar by castorflex.
the class MakeCustomActivity method updateValues.
private void updateValues() {
CircularProgressDrawable circularProgressDrawable;
CircularProgressDrawable.Builder b = new CircularProgressDrawable.Builder(this).colors(getResources().getIntArray(R.array.gplus_colors)).sweepSpeed(mSpeed).rotationSpeed(mSpeed).strokeWidth(dpToPx(mStrokeWidth)).style(CircularProgressDrawable.STYLE_ROUNDED);
if (mCurrentInterpolator != null) {
b.sweepInterpolator(mCurrentInterpolator);
}
mCircularProgressBar.setIndeterminateDrawable(circularProgressDrawable = b.build());
// /!\ Terrible hack, do not do this at home!
circularProgressDrawable.setBounds(0, 0, mCircularProgressBar.getWidth(), mCircularProgressBar.getHeight());
mCircularProgressBar.setVisibility(View.INVISIBLE);
mCircularProgressBar.setVisibility(View.VISIBLE);
}
Aggregations