Android可定制的水平不確定進度條:SmoothProgressBar
小型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();
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!