Android可定制的水平不确定进度条:SmoothProgressBar
jopen
10年前
小型Android库,让你实现一个平稳不确定的进度条。
mProgressBar.setIndeterminateDrawable(new SmoothProgressDrawable.Builder(context) .color(0xff0000) .interpolator(new DecelerateInterpolator()) .sectionsCount(4) .separatorLength(8) //You should use Resources#getDimensionPixelSize .strokeWidth(8f) //You should use Resources#getDimension .speed(2f) //2 times faster .progressiveStartSpeed(2) .progressiveStopSpeed(3.4) .reversed(false) .mirrorMode(false) .progressiveStart(true) .progressiveStopEndedListener(mListener) //called when the stop animation is over .build()); mProgressBar.setIndeterminateDrawable(new CircularProgressDrawable .Builder(this) .colors(getResources().getIntArray(R.array.gplus_colors)) .sweepSpeed(1f) .strokeWidth(mStrokeWidth) .style(CircularProgressDrawable.Style.ROUNDED) [ ... ] .build();