LoadingView
简介
一个模仿ProgressBar的加载动画,支持自定义颜色,风格(支持Linear和Material风格),支持设置圆环宽度等.
Demo
screenshot.gifGit地址
https://github.com/dudu90/LoadingView
使用方法
Gradle
compile 'com.pitt.loading.library:library:0.8'
Maven
<dependency>
<groupId>com.pitt.loading.library</groupId>
<artifactId>library</artifactId>
<version>0.8</version>
<type>pom</type>
</dependency>
然后在xml中加入如下代码:
<com.pitt.loadingview.library.LoadingView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
loadingview:color="#ff00"
loadingview:progress_style="material"
loadingview:ring_radius="15dp"
loadingview:ring_style="round"
loadingview:ring_width="3dp" />
attributes参数含义:
Name | Type | Default | Description |
---|---|---|---|
color | color | 0xFF0099CC | The Ring's Color |
progress_style | enum | material | The Ring's style when execute animation |
ring_radius | dimension | 15dp | The Ring's radius |
ring_style | enum | square | The ring's style(the paint's Cap) |
ring_width | dimension | 3.5dp | The ring's width |
网友评论