Android 自定义圆形进度条

转载请注明出处:http://blog.csdn.net/a512337862/article/details/72670008

自定义View在Android开发中一直是不可避免的存在。本文简单介绍一下如何实现自定义的圆形的进度条,先放一下效果图:

自定义圆形进度条

这个自定义的圆形progressBar可以设置背景色,进度条颜色、宽度,进度百分比的值、颜色、大小,最上层圆的颜色。

思路

先简单介绍一下圆形的进度条设计思路:
1.先在最底层画一个空心但边框线条很粗的大圆,这个圆的边框线条就相当于进度条的背景
2.在画一个空心同样边框线条很粗的弧,这个弧的角度会随进度的不同变化,形成变化的进度条的效果。
3.在最上层画一个实心的圆,圆的大小相当于最外层圆除边框的空心部分
4.最后在中心部分绘制进度百分比的文本

代码实现

利用自定义View实现自定义圆形的进度条,主要分为两个步骤:
1.自定义属性
2.重写onDraw()、onMeasure()方法

自定义属性

定义

自定义View基本上都会有自己独特的属性,所以自定义属性是不可避免的,关于如何自定义view的属性,我就不班门弄斧了,大家可以参考鸿洋大神的博客:http://blog.csdn.NET/lmj623565791/article/details/24252901。这里我就简单介绍一下自定义圆形进度条需要的自定义属性:

    <!--圆形进度条-->
    <declare-styleable name="CircleProgressBar">
        <attr name="textColor" format="color" />
        <attr name="progressColor" format="color" />
        <attr name="bottomColor" format="color" />
        <attr name="topColor" format="color" />
        <attr name="progressWidthPercent" format="integer" />
        <attr name="max" format="integer" />
        <attr name="progress" format="integer" />
        <attr name="textSize" format="dimension"/>
    </declare-styleable>

1.textColor : 进度文本的颜色
2.progressColor : 进度条颜色
3.bottomColor : 进度条背景色
4.topColor : 文本背景色
5.progressWidthPercent : 进度条宽度占总宽度的百分比
6.max : 最大进度(和progressBar相同)
7.progress : 当前进度(和progressBar相同)
8.textSize : 字体大小

获取

这里简单介绍一下如何在构造方法中获取在布局文件中声明的自定义属性:

TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.CircleProgressBar, defStyleAttr, 0);
        int n = a.getIndexCount();
        for (int i = 0; i < n; i++) {
            int attr = a.getIndex(i);
            switch (attr) {
                case R.styleable.CircleProgressBar_topColor:
                    //最上层圆(进度文本背景)的颜色,默认绿色
                    topColor = a.getColor(attr, Color.TRANSPARENT);
                    break;
                case R.styleable.CircleProgressBar_textColor:
                    //进度文本的颜色
                    textColor = a.getColor(attr, Color.BLACK);
                    break;
                case R.styleable.CircleProgressBar_progressColor:
                    //进度条颜色
                    progressColor = a.getColor(attr, Color.GREEN);
                    break;
                case R.styleable.CircleProgressBar_bottomColor:
                    //背景色
                    bottomColor = a.getColor(attr, Color.GREEN);
                    break;
                case R.styleable.CircleProgressBar_textSize:
                    //进度文本的大小
                    // 默认设置为16sp,TypeValue也可以把sp转化为px
                    textSize = a.getDimensionPixelSize(attr, (int) TypedValue.applyDimension(
                            TypedValue.COMPLEX_UNIT_SP, 16, getResources().getDisplayMetrics()));
                    break;
                case R.styleable.CircleProgressBar_progressWidthPercent:
                    //进度条宽度占总宽度的百分比
                    progressWidthPercent = a.getInteger(attr, 50);
                    break;
                case R.styleable.CircleProgressBar_max:
                    //进度最大值
                    max = a.getInteger(attr, 100);
                    break;
                case R.styleable.CircleProgressBar_progress:
                    //进度值
                    progress = a.getInteger(attr, 0);
                    break;
            }

        }
        //Recycles the TypedArray
        a.recycle();

获取自定义属性主要是通过TypedArray这个类,具体的大家依旧可以参考鸿洋大神的博客:http://blog.csdn.NET/lmj623565791/article/details/24252901

onMeasure

onMeasure的作用就是测量View的宽高,以便在onDraw方法中调用,我这里只是简单的判断宽高为warp_content的情况(MeasureSpec.AT_MOST),具体的可以实际情况设置:

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        int widthMode = MeasureSpec.getMode(widthMeasureSpec);
        int heightMode = MeasureSpec.getMode(heightMeasureSpec);
        int widthSize = MeasureSpec.getSize(widthMeasureSpec);
        int heightSize = MeasureSpec.getSize(heightMeasureSpec);
        //计算View的宽高
        int width = widthSize, height = heightSize;
        if (widthMode == MeasureSpec.EXACTLY) {
            //指定大小或者match_parent
            width = widthSize;
        } else if (widthMode == MeasureSpec.AT_MOST) {
            //wrap_content
            width = 100;
        }

        if (heightMode == MeasureSpec.EXACTLY) {
            //指定大小或者match_parent
            height = heightSize;
        } else if (heightMode == MeasureSpec.AT_MOST) {
            //wrap_content
            height = 100;
        }
        setMeasuredDimension(width, height);
    }

onDraw

onDraw主要用于绘制视图,所有的绘制操作都放到这个方法里面:

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        //canvas的宽高
        int width = getWidth();
        int height = getHeight();
        //进度条宽度占的比例
        double scale = progressWidthPercent / 100.00;
        //获取宽高中较短的作为底层圆的半径
        int bottomRadius = width > height ? height / 2 : width / 2;
        //这四个参数用来drawText以及drawArc
        int top = height / 2 - bottomRadius;
        int bottom = height / 2 + bottomRadius;
        int left = width / 2 - bottomRadius;
        int right = width / 2 + bottomRadius;
        //显示的进度
        showProgress = progress * 100 / max;
        //绘制最底层的大圆(空心圆)
        progressPaint.setStyle(Paint.Style.STROKE);
        progressPaint.setColor(bottomColor);
        //大圆的宽度刚好等于进度条的宽度
        int strokeWidth = (int) (bottomRadius * scale);
        progressPaint.setStrokeWidth(strokeWidth);
        //这里要考虑到strokeWidth的长度
        canvas.drawCircle(width / 2, height / 2, bottomRadius - strokeWidth / 2, progressPaint);
        //根据进度绘制进度条
        progressPaint.setStyle(Paint.Style.STROKE);
        progressPaint.setStrokeWidth(strokeWidth);
        progressPaint.setColor(progressColor);
        //起始角度为-90度才是从正上方开始画
        canvas.drawArc(left + strokeWidth / 2, top + strokeWidth / 2, right - strokeWidth / 2, bottom - strokeWidth / 2,
                -90, 360 * showProgress / 100, false, progressPaint);
        //绘制最上层的圆(实心圆)
        progressPaint.setStyle(Paint.Style.FILL);
        int topRadius = (int) (bottomRadius * (1 - scale));
        progressPaint.setColor(topColor);
        //设置边框宽度
        progressPaint.setStrokeWidth(0);
        canvas.drawCircle(width / 2, height / 2, topRadius, progressPaint);
        //在圆的中央显示进度文本
        textRect.set(left, top, right, bottom);
        drawTextOnRect(canvas, textRect, showProgress + " %");
    }

这里需要注意的是最外层绘制的是空心圆的时候:

        //绘制最底层的大圆(空心圆)
        progressPaint.setStyle(Paint.Style.STROKE);
        progressPaint.setColor(bottomColor);
        //大圆的宽度刚好等于进度条的宽度
        int strokeWidth = (int) (bottomRadius * scale);
        progressPaint.setStrokeWidth(strokeWidth);
        //这里要考虑到strokeWidth的长度
        canvas.drawCircle(width / 2, height / 2, bottomRadius - strokeWidth / 2, progressPaint);

因为半径是圆点到边框中间的距离,所以如果直接以bottomRadius为半径的话,就会有一半的边框在canvas之外,无法绘制出来。绘制空心弧形也是同样的道理。具体的可以参考:http://blog.csdn.net/a512337862/article/details/74161988
另外,drawTextOnRect这个方法是用来绘制文本的,它的主要功能是将文本显示在指定的rect中央。因为drawText里是以baseline为基准的,直接以目标矩形的bottom传进drawText,字符位置会偏下。具体代码大家可以参考下面的CircleProgressBar.java完整代码。

完整代码

自定义View的java代码、attr文件如下,仅供大家参考:

CircleProgressBar.java

/**
 * Created by ZhangHao on 2017/5/22.
 * 自定义圆形Progress
 */

public class CircleProgressBar extends View {

    //进度最大值
    private int max;
    //当前进度
    private int progress;
    //显示的进度(progress/max*100 %)
    private int showProgress;
    //进度条的颜色
    private int progressColor;
    //进度条宽度百分比
    private int progressWidthPercent;
    //底层背景色
    private int bottomColor;
    //最上层圆的颜色
    private int topColor;
    //进度文本的颜色
    private int textColor;
    //进度文本的字体大小
    private int textSize;
    //进度条画笔
    private Paint progressPaint;
    //文本画笔
    private Paint textPaint;
    //用来显示文本的矩形
    private Rect textRect;

    public CircleProgressBar(Context context) {
        this(context, null, 0);
    }

    public CircleProgressBar(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public CircleProgressBar(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initDefault();
        TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.CircleProgressBar, defStyleAttr, 0);
        int n = a.getIndexCount();
        for (int i = 0; i < n; i++) {
            int attr = a.getIndex(i);
            switch (attr) {
                case R.styleable.CircleProgressBar_topColor:
                    //最上层圆的颜色,默认绿色
                    topColor = a.getColor(attr, Color.TRANSPARENT);
                    break;
                case R.styleable.CircleProgressBar_textColor:
                    //进度文本的颜色
                    textColor = a.getColor(attr, Color.BLACK);
                    break;
                case R.styleable.CircleProgressBar_progressColor:
                    //进度条颜色
                    progressColor = a.getColor(attr, Color.GREEN);
                    break;
                case R.styleable.CircleProgressBar_bottomColor:
                    //背景色
                    bottomColor = a.getColor(attr, Color.GREEN);
                    break;
                case R.styleable.CircleProgressBar_textSize:
                    //进度文本的大小
                    // 默认设置为16sp,TypeValue也可以把sp转化为px
                    textSize = a.getDimensionPixelSize(attr, (int) TypedValue.applyDimension(
                            TypedValue.COMPLEX_UNIT_SP, 16, getResources().getDisplayMetrics()));
                    break;
                case R.styleable.CircleProgressBar_progressWidthPercent:
                    //进度条宽度占总宽度的百分比
                    progressWidthPercent = a.getInteger(attr, 50);
                    break;
                case R.styleable.CircleProgressBar_max:
                    //进度最大值
                    max = a.getInteger(attr, 100);
                    break;
                case R.styleable.CircleProgressBar_progress:
                    //进度值
                    progress = a.getInteger(attr, 0);
                    break;
            }

        }
        //Recycles the TypedArray
        a.recycle();
        /**
         * 初始化画笔
         */
        //文本画笔
        textPaint = new Paint();
        textPaint.setTextSize(textSize);
        textPaint.setColor(textColor);
        //设置抗锯齿
        textPaint.setAntiAlias(true);
        //进度条画笔
        progressPaint = new Paint();
        //设置抗锯齿
        progressPaint.setAntiAlias(true);
        //初始化textRect
        textRect = new Rect();
    }

    /**
     * 设置默认值
     */
    private void initDefault() {
        //最上层默认为透明
        topColor = Color.TRANSPARENT;
        //字体颜色默认为黑色
        textColor = Color.BLACK;
        //进度条默认为绿色
        progressColor = Color.GREEN;
        //背景为灰色
        bottomColor = Color.GRAY;
        //字体大小16
        textSize = 16;
        //进度0
        progress = 0;
        //最大进度100
        max = 100;
        //进度条宽度比例50
        progressWidthPercent = 50;
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        //canvas的宽高
        int width = getWidth();
        int height = getHeight();
        //进度条宽度占的比例
        double scale = progressWidthPercent / 100.00;
        //获取宽高中较短的作为底层圆的半径
        int bottomRadius = width > height ? height / 2 : width / 2;
        //这四个参数用来drawText以及drawArc
        int top = height / 2 - bottomRadius;
        int bottom = height / 2 + bottomRadius;
        int left = width / 2 - bottomRadius;
        int right = width / 2 + bottomRadius;
        //显示的进度
        showProgress = progress * 100 / max;
        //绘制最底层的大圆(空心圆)
        progressPaint.setStyle(Paint.Style.STROKE);
        progressPaint.setColor(bottomColor);
        //大圆的宽度刚好等于进度条的宽度
        int strokeWidth = (int) (bottomRadius * scale);
        progressPaint.setStrokeWidth(strokeWidth);
        //这里要考虑到strokeWidth的长度
        canvas.drawCircle(width / 2, height / 2, bottomRadius - strokeWidth / 2, progressPaint);
        //根据进度绘制进度条
        progressPaint.setStyle(Paint.Style.STROKE);
        progressPaint.setStrokeWidth(strokeWidth);
        progressPaint.setColor(progressColor);
        //起始角度为-90度才是从正上方开始画
        canvas.drawArc(left + strokeWidth / 2, top + strokeWidth / 2, right - strokeWidth / 2, bottom - strokeWidth / 2,
                -90, 360 * showProgress / 100, false, progressPaint);
        //绘制最上层的圆(实心圆)
        progressPaint.setStyle(Paint.Style.FILL);
        int topRadius = (int) (bottomRadius * (1 - scale));
        progressPaint.setColor(topColor);
        //设置边框宽度
        progressPaint.setStrokeWidth(0);
        canvas.drawCircle(width / 2, height / 2, topRadius, progressPaint);
        //在圆的中央显示进度文本
        textRect.set(left, top, right, bottom);
        drawTextOnRect(canvas, textRect, showProgress + " %");
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        int widthMode = MeasureSpec.getMode(widthMeasureSpec);
        int heightMode = MeasureSpec.getMode(heightMeasureSpec);
        int widthSize = MeasureSpec.getSize(widthMeasureSpec);
        int heightSize = MeasureSpec.getSize(heightMeasureSpec);
        //计算View的宽高
        int width = widthSize, height = heightSize;
        if (widthMode == MeasureSpec.EXACTLY) {
            //指定大小或者match_parent
            width = widthSize;
        } else if (widthMode == MeasureSpec.AT_MOST) {
            //wrap_content
            width = 100;
        }

        if (heightMode == MeasureSpec.EXACTLY) {
            //指定大小或者match_parent
            height = heightSize;
        } else if (heightMode == MeasureSpec.AT_MOST) {
            //wrap_content
            height = 100;
        }
        setMeasuredDimension(width, height);
    }

    /**
     * 在指定矩形中间drawText
     *
     * @param canvas     画布
     * @param targetRect 指定矩形
     * @param text       需要绘制的Text
     */
    private void drawTextOnRect(Canvas canvas, Rect targetRect, String text) {
        Paint.FontMetricsInt fontMetrics = textPaint.getFontMetricsInt();
        // 获取baseLine
        int baseline = targetRect.top + (targetRect.bottom - targetRect.top - fontMetrics.bottom + fontMetrics.top) / 2 - fontMetrics.top;
        // 下面这行是实现水平居中,drawText对应改为传入targetRect.centerX()
        textPaint.setTextAlign(Paint.Align.CENTER);
        canvas.drawText(text, targetRect.centerX(), baseline, textPaint);
    }

    public int getMax() {
        return max;
    }

    public void setMax(int max) {
        this.max = max;
        postInvalidate();
    }

    public int getProgress() {
        return progress;
    }

    public void setProgress(int progress) {
        this.progress = progress;
        postInvalidate();
    }

    public int getProgressColor() {
        return progressColor;
    }

    public void setProgressColor(int progressColor) {
        this.progressColor = progressColor;
        postInvalidate();
    }

    public int getBottomColor() {
        return bottomColor;
    }

    public int getProgressWidthPercent() {
        return progressWidthPercent;
    }

    public void setProgressWidthPercent(int progressWidthPercent) {
        this.progressWidthPercent = progressWidthPercent;
        postInvalidate();
    }

    public void setBottomColor(int bottomColor) {
        this.bottomColor = bottomColor;
        postInvalidate();
    }

    public int getTopColor() {
        return topColor;
    }

    public void setTopColor(int topColor) {
        this.topColor = topColor;
        postInvalidate();
    }

    public int getTextColor() {
        return textColor;
    }

    public void setTextColor(int textColor) {
        this.textColor = textColor;
        postInvalidate();
    }

    public int getTextSize() {
        return textSize;
    }

    public void setTextSize(int textSize) {
        this.textSize = textSize;
        postInvalidate();
    }
}

attr.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!--圆形进度条-->
    <declare-styleable name="CircleProgressBar">
        <attr name="textColor" format="color" />
        <attr name="progressColor" format="color" />
        <attr name="bottomColor" format="color" />
        <attr name="topColor" format="color" />
        <attr name="progressWidthPercent" format="integer" />
        <attr name="max" format="integer" />
        <attr name="progress" format="integer" />
        <attr name="textSize" format="dimension"/>
    </declare-styleable>
</resources>

结语

1.因为本人文字功底有限,所以介绍性的文字很少,但是基本上每句代码都加了注释,理解起来应该不难,如果有任何问题,可以留言。
2.demo下载地址:https://github.com/LuoChen-Hao/BlackHaoCustomView

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
总共分为三层:一层为圆形边线,一层为进度边线,一层用来显示标识进度节点。 public class CircleProgressBar extends View { private int maxProgress = 100; private int progress = 15; private int progressStrokeWidth = 2; private int marxArcStorkeWidth = 16; // 画圆所在的距形区域 RectF oval; Paint paint; public CircleProgressBar(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub oval = new RectF(); paint = new Paint(); } @Override protected void onDraw(Canvas canvas) { // TODO 自动生成的方法存根 super.onDraw(canvas); int width = this.getWidth(); int height = this.getHeight(); width = (width > height) ? height : width; height = (width > height) ? height : width; paint.setAntiAlias(true); // 设置画笔为抗锯齿 paint.setColor(Color.WHITE); // 设置画笔颜色 canvas.drawColor(Color.TRANSPARENT); // 白色背景 paint.setStrokeWidth(progressStrokeWidth); // 线宽 paint.setStyle(Style.STROKE); oval.left = marxArcStorkeWidth / 2; // 左上角x oval.top = marxArcStorkeWidth / 2; // 左上角y oval.right = width - marxArcStorkeWidth / 2; // 左下角x oval.bottom = height - marxArcStorkeWidth / 2; // 右下角y canvas.drawArc(oval, -90, 360, false, paint); // 绘制白色圆圈,即进度条背景 paint.setColor(Color.rgb(0x57, 0x87, 0xb6)); paint.setStrokeWidth(marxArcStorkeWidth); canvas.drawArc(oval, -90, ((float) progress / maxProgress) * 360, false, paint); // 绘制进度圆弧,这里是蓝色 paint.setStrokeWidth(1); String text = progress + "%"; int textHeight = height / 4; paint.setTextSize(textHeight); int textWidth = (int) paint.measureText(text, 0, text.length()); paint.setStyle(Style.FILL); canvas.drawText(text, width / 2 - textWidth / 2, height / 2 + textHeight / 2, paint); } public int getMaxProgress() { return maxProgress; } public void setMaxProgress(int maxProgress) { this.maxProgress = maxProgress; } /** * 设置进度 * * @param progress * 进度百分比 * @param view * 标识进度的节点视图 */ public void setProgress(int progress, View view) { this.progress = progress; view.setAnimation(pointRotationAnima(0, (int) (((float) 360 / maxProgress) * progress))); this.invalidate(); } /** * 非UI线程调用 */ public void setProgressNotInUiThread(int progress, View view) { this.progress = progress; view.setAnimation(pointRotationAnima(0, (int) (((float) 360 / maxProgress) * progress))); this.postInvalidate(); } /** * 进度标注点的动画 * * @param fromDegrees * @param toDegrees * @return */ private Animation pointRotationAnima(float fromDegrees, float toDegrees) { int initDegress = 306;// 进度点起始位置(图片偏移约54度) RotateAnimation animation = new RotateAnimation(fromDegrees, initDegress + toDegrees, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); animation.setDuration(1);// 设置动画执行时间 animation.setRepeatCount(1);// 设置重复执行次数 animation.setFillAfter(true);// 设置动画结束后是否停留在结束位置 return animation; } }
### 回答1: 要在Android自定义圆形进度条,可以按照以下步骤进行: 1. 首先,在XML布局文件中添加一个半圆形View。可以使用自定义View继承自View类,或者使用现有的绘图类如Canvas和Path来绘制半圆形。 2. 在自定义View中,重写onDraw方法,通过Canvas对象绘制半圆形。可以使用drawArc方法来画出一个弧线,指定起点、终点和角度,来绘制半圆形。 3. 在自定义View中添加一个属性来表示当前进度。可以使用属性动画或者定时器来不断更新进度,并调用invalidate方法来重绘View。 4. 在自定义View中添加一些自定义属性,如颜色、宽度等,来实现进度条的样式定制。 5. 在Activity中使用这个自定义View,可以通过findViewById找到它,并设置进度条的属性和监听器等。 通过以上步骤,就可以实现一个自定义的半圆形进度条。根据具体需求和设计,可以进行更多的样式和功能定制,如添加文本显示、动画效果等。 ### 回答2: 要实现Android自定义圆形进度条,可以采用以下步骤: 1. 首先,在布局文件中创建一个自定义View,用于绘制半圆形进度条。可以使用Canvas来进行绘制。在View的构造函数中初始化一些必要的参数,如进度条的颜色、背景颜色等。 2. 在自定义View的onDraw()方法中,使用Canvas绘制一个半圆形的背景,可以使用drawArc()方法,并设置起始角度和扫描角度。 3. 接着,绘制进度条的一段弧线。根据进度的值计算出起始和结束的角度,并使用drawArc()方法进行绘制。 4. 在Activity中,实例化自定义View,并将其添加到布局中。可以使用setProgress()方法来设置进度条的进度值。 5. 如果需要实现动画效果,可以使用ValueAnimator来改变进度值,并在动画过程中不断调用invalidate()方法来刷新视图。 总结:自定义圆形进度条的关键是使用Canvas的drawArc()方法进行绘制,根据进度值来计算起始和结束的角度,并使用invalidate()方法来进行视图的刷新。通过这些步骤,即可实现Android自定义圆形进度条的效果。 ### 回答3: 要实现Android自定义圆形进度条,可以通过自定义View来实现。 首先,创建一个继承自View自定义View类,并重写其中的三个方法:onMeasure()、onDraw()和onSizeChanged()。 在onMeasure()方法中,设置View的宽度和高度,可以根据需求来设置,比如设置为200dp,然后将测量的结果保存。 在onSizeChanged()方法中,获取View的宽度和高度,用于后续计算绘制进度条的位置。 在onDraw()方法中,绘制半圆形进度条的背景和进度。首先,使用Paint类创建两个画笔,一个用于绘制背景,一个用于绘制进度。然后,通过Path类创建一个半圆形的路径,使用drawPath()方法绘制出半圆形。接着,根据进度计算出进度条的结束位置,使用drawArc()方法绘制出进度条。最后,使用drawText()方法绘制出进度的文字。 在Activity或Fragment中使用自定义View,可以通过布局文件或代码的方式进行添加。如果使用布局文件,可以在XML文件中使用自定义的命名空间,并设置View的属性。如果使用代码,可以在onCreate()方法中使用addView()方法添加。 以上就是实现Android自定义圆形进度条的大致步骤。根据具体需求,还可以添加其他功能,比如添加动画效果,改变进度条的颜色等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值