A configurable Metro-style loading progress.
##Usage ###1.Setup Gradle
<dependencies {
compile 'com.mmga.metroloading:metroloading:1.0.0'
}
###2.Add MetroLoadingView to your layout
<com.mmga.metroloading.MetroLoadingView
android:id="@+id/loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:transform_color="#ee00ff"
app:indicator_height="9dp"
app:indicator_width="4dp"
/>
###3.Use it as a normal custom view
mLoading.start();
now you should have got the loading animation as Preview
##Customization
###1.change the speed,interval and number of indicator
app:number="3"
app:duration_in_mills="1500"
app:interval_in_mills="100"
###2.fade in an out
app:fade="true"
###3.change the scale
app:transform="true"
app:transform_height="15dp"
app:transform_width="4dp"
app:transform_radius="3dp"
this dimension is the size when indicators move to just middle of the view
###4.add a shadow
app:has_shadow = "true"
app:shadow_color="#666666"
###5.make it colorful
app:transform_color_mode="symmetry" //or linear or none
app:transform_color="#ee00ff"
transform_color_mode = symmetry
###6."Coach! I want to play ball" Take it
app:indicator="circle" // or rectangle
attributes above are all available for the ball
###Options available in XML attributes:
Attribute | Description |
---|---|
indicator | shape of indicator,"rectangle" or "circle" |
indicator_color | color |
indicator_width | dimension |
indicator_height | dimension |
indicator_radius | dimension |
duration_in_mills | integer |
interval_in_mills | integer |
number | integer |
transform | boolean |
transform_height | dimension,the height when comes to the middle |
transform_width | dimension |
transform_radius | dimension |
transform_color_mode | "none","linear","symmetry" |
transform_color | the color in the end(linear) or middle(symmetry) |
fade | boolean |
has_shadow | boolean |
shadow_color | color |
###API available
Method |
---|
start() |
stop() |
isAnimating() |
##About me
Copyright (c) 2015 mmga
Licensed under the Apache License, Version 2.0