CircleProgressMenu
介绍:
一个带进度显示的圆形菜单。圆的默认颜色为灰色,当它里面有任务在进行的时候变成绿色,任务完成变成蓝色。也可以自定义这些颜色。
运行效果:
使用说明:
//amount of the circles around
private int aroundCircleCount = 7;
//the currrent progress num(=<aroundCircleCount)
private int currentProgressNum = 3;
//Icons of around circle (set by yourself)
private int\[\] circleIcon = {R.drawable.xxx,"","","","","",""};
//the en and cn of the circles around
private int\[\] aroundCircleTitleEn = {R.string.xxx,"","","","","",""};
private int\[\] aroundCircleTitleCn = {R.string.xxx,"","","","","",""};
//status of every circle
//default->grey,doing->green,complete->blue
//three status and color set by yourself
private int\[\] circleCompleteStatusList = {"","","","","","",""};
.
final CircleLayout circleLayout = (CircleLayout) findViewById(R.id.circle_layout);
circleLayout.setView(aroundCircleTitleEn,
aroundCircleTitleCn,
circleIcon,
aroundCircleCount,
circleCompleteStatusList);
circleLayout.setProgressNum(currentProgressNum);
circleLayout.initView();
circleLayout.startAnim(360f * currentProgressNum / 7);
circleLayout.setOnClickListener(new CircleLayout.circleClickListener() {
@Override
public void click(int tag) {
//the tag of circle which you click
}
});
.
<com.stew.myapplication.CircleLayout
android:id="@+id/circle_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:aroundCircleCompleteColor="@color/around_circle_complete_color"
app:aroundCircleDefColor="@color/around_circle_def_color"
app:aroundCircleDoingColor="@color/around_circle_doing_color"
app:centerArcColor="@color/arc_change"
app:centerArcColorDef="@color/arc_default"
app:centerCircleColor="@color/center_circle_color"
app:centerCircleText="Start"
app:centerCircleTextColor="@color/white"
app:centerCircleTextSize="22sp"
app:aroundSmallCircleColor="@color/white"
app:titleSize="12sp"
app:titleColor="@color/white"/>
下载apk
已下载
0