支持高度配置的 Android 加載進度球:loading-balls
一款支持高度配置的 Android 加載進度球.
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>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!