这是一个自定义控件合集。目前包含Loading View。持续更新中...
- XML:
<com.zyao89.view.zloading.ZLoadingView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:z_type="CircleBuilder"
app:z_color="@color/colorAccent"/>
z_type
选择加载动画的类型,就是下面介绍的这些;
z_color
设置加载动画的颜色;
- Java
ZLoadingView zLoadingView = (ZLoadingView) findViewById(R.id.loadingView_1);
zLoadingView.setLoadingBuilder(Z_TYPE.CIRCLE);//设置类型
zLoadingView.setColorFilter(Color.WHITE);//设置颜色
索引 | 名称 | 枚举值(Z_TYPE) |
---|---|---|
0 | CircleBuilder | CIRCLE |
1 | ClockBuilder | CIRCLE_CLOCK |
2 | StarBuilder | STAR_LOADING |
3 | LeafBuilder | LEAF_ROTATE |
4 | DoubleCircleBuilder | DOUBLE_CIRCLE |
5 | PacManBuilder | PAC_MAN |
6 | ElasticBallBuilder | ELASTIC_BALL |