效果图如下。
布局中使用
<com.docom.app.tvm.ui.view.RoundProgressBar android:id="@+id/circle" android:layout_width="130dp" android:layout_height="130dp" android:layout_marginRight="20dp" android:layout_marginTop="30dp" android:visibility="invisible" android_custom:roundColor="#868686" android_custom:roundProgressColor="#005eee" android_custom:roundWidth="8dp" android_custom:textColor="#FF1111" android_custom:textIsDisplayable="true" android_custom:textSize="30dp" tools:visibility="visible" />
代码中
RoundProgressBar circle=(RoundProgressBar)findViewById(R.id.circle);
circle.setListener(new RoundProgressBar.CountDownListener() { @Override public void CountDown() { showToast("操作超时,请重新操作"); goHome(); } });
circle.start();