使用圆形和扇形的 Android 简单的进度提示或图表小组件
crpv = (ColorfulRingProgressView) findViewById(R.id.crpv);
crpv.setPercent(75);
crpv.setStartAngle(0);
crpv.setBgColor(0xffe1e1e1);
crpv.setFgColorStart(0xffffe400);
crpv.setFgColorEnd(0xffff4800);
crpv.setStrokeWidthDp(21);spv = (SectorProgressView) findViewById(R.id.spv);
spv.setPercent(25);
spv.setStartAngle(0);
spv.setBgColor(0xffe5e5e5);
spv.setFgColor(0xffff765c);此库添加了 SectorProgressView 和 ColorfulRingProgressView 的不确定状态 API。配置角度或百分比参数,然后调用 animateIndeterminate
animateIndeterminate()
// if you want custom the duration or TimeInterpolator
animateIndeterminate(int durationOneCircle, TimeInterpolator interpolator)
// to stop animate
stopAnimateIndeterminate()dependencies {
compile 'com.timqi.sectorprogressview:library:2.0.1'
}File -> New -> Import Module, 然后导航到源目录中的 library 文件夹即可。暂无开放 Issues,或尚未同步最近议题。