您当前的位置: 首页 >  安全

模仿小米安全中心的进度效果

发布时间:2016-10-19 09:24:30 ,浏览量:0

GradeProgressView
项目地址: niniloveyou/GradeProgressView
简介:模仿小米安全中心的进度效果

a progress view used to grade mobiles phone

System Requirement

Android API 11+, Because of the use of ValueAnimation, if you want use it on API 8, please use NineoldAndroids library in your project.

Usage
gradeProgressView.setProgress(100);                 //without animation

    gradeProgressView.setProgressWidthAnimation(100);   // with animation

    gradeProgressView.setBackgroundColor(Color.LTGRAY); //set background color

    gradeProgressView.setProgressColor(Color.WHITE);    //set progress and pointer color

    gradeProgressView.setLineWidth(60);                 //set the progress width

    gradeProgressView.setGapWidth(30);                  //set gap between out line and progress line

    gradeProgressView.setOutLineWidth(5);               //set out line widht

    gradeProgressView.setOnProgressChangeListener(new GradeProgressView.OnProgressChangeListener() {
        @Override
        public void onProgressChanged(GradeProgressView gradeProgressView, int progress) {
            Log.i("GradeProgressView test", "on progress changed: " + progress);
        }
    });
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    111326博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.1387s