支持高度配置的 Android 加载进度球:loading-balls

jopen 9年前

一款支持高度配置的 Android 加载进度球.


Demo Screenshot

How to use

Custom attributes

lib:path="triangle"

The shape of the movement, available:

*  infinite  *  square  *  triangle  *  circle  *  diamond  *  star
lib:balls="3"

Number of balls used in the animation

lib:movement_cycle_time="1500"

The time which the ball takes to do a complete cicle

lib:enable_size_animation="true"

Enables the size animation in the balls (by default is false)

lib:size_cycle_time="500"

The time it takes to the ball to grow up and decrease the size one time

lib:ball_size="6dp"

Set the balls size

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

lib:ball_colors="@array/colors"

Array of colors for the balls, if there are more balls than colors then repeat color balls

<?xml version="1.0" encoding="utf-8"?>  <resources>    <color name="ball1">#FFD91C</color>    <color name="ball2">#FF4B4A</color>    <color name="ball3">#3D8EFF</color>      <integer-array name="colors">      <item>@color/ball1</item>      <item>@color/ball2</item>      <item>@color/ball3</item>    </integer-array>  </resources>

项目主页:http://www.open-open.com/lib/view/home/1448850128639