Skip to content

Repository files navigation

A configurable Metro-style loading progress.

##Preview

##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 = linear


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:

AttributeDescription
indicatorshape of indicator,"rectangle" or "circle"
indicator_colorcolor
indicator_widthdimension
indicator_heightdimension
indicator_radiusdimension
duration_in_millsinteger
interval_in_millsinteger
numberinteger
transformboolean
transform_heightdimension,the height when comes to the middle
transform_widthdimension
transform_radiusdimension
transform_color_mode"none","linear","symmetry"
transform_colorthe color in the end(linear) or middle(symmetry)
fadeboolean
has_shadowboolean
shadow_colorcolor

###API available

Method
start()
stop()
isAnimating()

##About me

Email

License

Copyright (c) 2015 mmga

Licensed under the Apache License, Version 2.0

About

Metro-style Loading

Resources

Stars

58 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages