下载进度条Module
链接:https://pan.baidu.com/s/11nejB9Lvwhfwr-hcH9ilRA
提取码:9w8v
布局文件:
<com.moos.library.CircleProgressView android:id="@+id/progressView_circle" android:layout_width="240dp" android:layout_height="240dp" android:layout_marginTop="12dp" app:start_progress="0" app:end_progress="30" app:start_color="@color/purple_end" app:end_color="@color/purple_start" app:progressTextSize="36sp" app:progressTextColor="@color/blue_start" app:circleBroken="true" app:isTracked="true" app:isFilled="false" app:trackColor="#f3f3ee" app:track_width="26dp" app:animateType="AccelerateDecelerateInterpolator"/>
java代码:
public final class JianceshebeiDetailsActivity extends MyActivity { @BindView(R.id.progressView_circle) CircleProgressView progressViewCircle; @Override protected int getLayoutId() { return R.layout.activity_jianceshebei_details; } @Override public void onRightClick(View v) { super.onRightClick(v); //加载进度条 progressViewCircle.setEndProgress(40); progressViewCircle.startProgressAnimation(); } @Override protected void initView() { } @Override protected void initData() { progressViewCircle.post(new Runnable() { @Override public void run() { //设置进度条样式为刻度表 progressViewCircle.setGraduatedEnabled(true); } }); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // TODO: add setContentView(...) invocation ButterKnife.bind(this); } }
原始module GitHub:https://github.com/Moosphan/Material-ProgressView