diff --git a/README.md b/README.md new file mode 100644 index 0000000..54f669a --- /dev/null +++ b/README.md @@ -0,0 +1,402 @@ +Loading Balls +----------------- +[![Download](https://api.bintray.com/packages/glomadrian/maven/MaterialAnimatedSwitch/images/download.svg) ](https://bintray.com/glomadrian/maven/MaterialAnimatedSwitch/_latestVersion) +[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Material%20Animated%20Switch-green.svg?style=flat)](https://android-arsenal.com/details/1/1985) + +A highly configurable library to do loading progress with animated balls + + +//TODO Some samples here +![Demo Screenshot][1] + +![Demo Screenshot][2] + + + +How to use +---------- + +### Custom attributes + + +``` xml +lib:balls="3" +``` +Number of balls used in the animation + +``` xml +lib:movement_cycle_time="1500" +``` +The time it takes for the ball to do a complete cicle + +``` xml +lib:enable_size_animation="true" +``` +Enables the size animation in the balls (by default is false) + +``` xml +lib:size_cycle_time="500" +``` +The time it takes to the ball to grow up and decrease the size one time + + +``` xml +lib:ball_size="6dp" +``` +Set the balls size + +``` xml +lib:min_ball_size="5dp" +lib:max_ball_size="12dp" +``` +To use with enable_size_animation="true", set the min and the max ball size + +``` xml +lib:ball_colors="@array/colors" +``` +Array of colors for the balls, is there are more balls than colors then repeat +color balls + +``` xml + + + #FFD91C + #FF4B4A + #3D8EFF + + + @color/ball1 + @color/ball2 + @color/ball3 + + +``` +Sample colors array + +### Some Samples + +#### Default Infinite shape + +//TODO GIF + +``` xml + +``` + +#### Infinite shape without size animation + +//TODO GIF + +``` xml + +``` +#### Infinite shape with 5 balls + +//TODO GIF + +``` xml + +``` + +#### Triangle shape with 3 balls and size animation + +//TODO GIF + +``` xml + +``` + +#### Triangle shape with 2 balls + +//TODO GIF + +``` xml + +``` + +#### Square shape with 3 balls + +//TODO GIF + +``` xml + +``` + +#### Square shape with 5 balls and size animation + +//TODO GIF + +``` xml + +``` + +#### Circle shape with 3 balls and size animation + +//TODO GIF + +``` xml + +``` +#### Circle shape with 2 balls without size animation + +//TODO GIF + +``` xml + +``` +#### Star shape with 10 balls without size animation + +//TODO GIF + +``` xml + +``` +#### Star shape with 5 balls and size animation + +//TODO GIF + +``` xml + +``` +#### Star shape with 3 balls and size animation + +//TODO GIF + +``` xml + +``` +#### Diamond shape with 5 balls without size animation + +//TODO GIF + +``` xml + +``` +#### Diamond shape with 4 balls and size animation + +//TODO GIF + +``` xml + +``` +#### Diamond shape with 10 balls without size animation + +//TODO GIF + +``` xml + +``` + +Developed By +------------ +Adrián García Lomas - +* [Twitter](https://twitter.com/glomadrian) +* [LinkedIn](https://es.linkedin.com/in/glomadrian ) + +License +------- + + Copyright 2015 Adrián García Lomas + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +[1]: ./art/1.gif +[2]: ./art/2.gif +[3]: ./art/3.gif +[4]: ./art/4.gif +[5]: ./art/5.gif +[6]: ./art/6.gif +[7]: ./art/7.gif +[8]: ./art/8.gif +[9]: ./art/9.gif +[10]: ./art/10.gif +[11]: ./art/11.gif +[12]: ./art/12.gif +[13]: ./art/13.gif +[14]: ./art/14.gif +[15]: ./art/15.gif diff --git a/app/src/androidTest/java/com/github/glomadrian/loadingballssample/ApplicationTest.java b/app/src/androidTest/java/com/github/glomadrian/loadingballssample/ApplicationTest.java index 9c5fd11..643009c 100644 --- a/app/src/androidTest/java/com/github/glomadrian/loadingballssample/ApplicationTest.java +++ b/app/src/androidTest/java/com/github/glomadrian/loadingballssample/ApplicationTest.java @@ -1,4 +1,4 @@ -package com.github.glomadrian.loadingballssample; +package com.github.glomadrian.loadingballs; import android.app.Application; import android.test.ApplicationTestCase; diff --git a/app/src/main/java/com/github/glomadrian/loadingballssample/MainActivity.java b/app/src/main/java/com/github/glomadrian/loadingballssample/MainActivity.java index 7b4071e..ad27a87 100644 --- a/app/src/main/java/com/github/glomadrian/loadingballssample/MainActivity.java +++ b/app/src/main/java/com/github/glomadrian/loadingballssample/MainActivity.java @@ -1,7 +1,7 @@ package com.github.glomadrian.loadingballssample; -import android.support.v7.app.AppCompatActivity; import android.os.Bundle; +import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7a579ad..e62f647 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -14,9 +14,9 @@ android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" android:orientation="vertical" - tools:context="com.github.glomadrian.loadingballssample.MainActivity"> + tools:context="com.github.glomadrian.loadingballs.MainActivity"> - - - - - - - - - - - - - - - - -