# loading-balls **Repository Path**: mirrors/loading-balls ## Basic Information - **Project Name**: loading-balls - **Description**: Loading Balls 是 Android 高度可配置的加载进程动画 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: https://www.oschina.net/p/loading-balls - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-27 - **Last Updated**: 2025-08-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Loading Balls ----------------- [![Download](https://api.bintray.com/packages/glomadrian/maven/MaterialCodeInput/images/download.svg) ](https://bintray.com/glomadrian/maven/loading-balls/_latestVersion) A highly configurable library to do loading progress with animated balls for Android ![Demo Screenshot][1] How to use ---------- ### Custom attributes ``` xml lib:path="triangle" ``` The shape of the movement, available: * infinite * square * triangle * circle * diamond * star ``` xml lib:balls="3" ``` Number of balls used in the animation ``` xml lib:movement_cycle_time="1500" ``` The time which the ball takes 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, if there are more balls than colors then repeat color balls ``` xml #FFD91C #FF4B4A #3D8EFF @color/ball1 @color/ball2 @color/ball3 ``` Sample colors array For Gradle --------------------- Add repository ```java repositories { maven { url "http://dl.bintray.com/glomadrian/maven" } } ``` Add dependency ```java compile 'com.github.glomadrian:loadingballs:1.1@aar' ``` ### Some Samples #### Default Infinite shape ![Sample][1] ``` xml ``` #### Infinite shape without size animation ![Sample][2] ``` xml ``` #### Infinite shape with 5 balls ![Sample][3] ``` xml ``` #### Triangle shape with 3 balls and size animation ![Sample][4] ``` xml ``` #### Triangle shape with 2 balls ![Sample][5] ``` xml ``` #### Square shape with 3 balls ![Sample][6] ``` xml ``` #### Square shape with 5 balls and size animation ![Sample][7] ``` xml ``` #### Circle shape with 3 balls and size animation ![Sample][8] ``` xml ``` #### Circle shape with 2 balls without size animation ![Sample][9] ``` xml ``` #### Star shape with 10 balls without size animation ![Sample][10] ``` xml ``` #### Star shape with 5 balls and size animation ![Sample][11] ``` xml ``` #### Star shape with 3 balls and size animation ![Sample][12] ``` xml ``` #### Diamond shape with 5 balls without size animation ![Sample][14] ``` xml ``` #### Diamond shape with 4 balls and size animation ![Sample][13] ``` xml ``` #### Diamond shape with 10 balls without size animation ![Sample][15] ``` 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