android-PullRefreshLayout
This component like SwipeRefreshLayout, it is more beautiful than SwipeRefreshLayout.
Usage
Add dependency.
dependencies {
compile 'com.baoyz.pullrefreshlayout:library:1.2.0'
}
Use method like SwipeRefreshLayout's usage.
Use it in your layout xml.
Get instance and use it.
Change the refresh style, there are five styles of use, MATERIAL
、CIRCLES
、 WATER_DROP
、RING
and SMARTISAN
.
In java, call setRefreshStyle
method.
In xml, use attributes.
Change the color scheme.
In java, call setColorSchemeColors
method. The int array length must be 4.
For Smartisan style, it has only one color, can call 'setColor' method, to set one color.
In xml, use attributes.
If you do not like these styles, you can customize the refresh style.
Call setRefreshDrawable()
method to use your custom refresh drawable.