BounceProgressBar

Additional

Language
Java
Version
N/A
Created
Nov 17, 2014
Updated
Apr 21, 2017 (Retired)
Owner
Rocko (zhengxiaopeng)
Contributor
Rocko (zhengxiaopeng)
1
Activity
Badge
Generate
Download
Source code
APK file

Announcement

Android BounceProgressBar Widget


Declare an BounceProgressBar inside your XML layout file.

<org.rocko.bpb.BounceProgressBar
            xmlns:bpb="http://schemas.android.com/apk/res-auto"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            bpb:shape="circle"
            bpb:singleSrcSize="8dp"
            bpb:speed="250"
            bpb:src="#6495ED" />

or

<org.rocko.bpb.BounceProgressBar
      xmlns:bpb="http://schemas.android.com/apk/res-auto"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            bpb:shape="heart"
            bpb:singleSrcSize="25dp"
            bpb:speed="300"
            bpb:src="@drawable/github" />

The BounceProgressBar has the following attribute

    <declare-styleable name="BounceProgressBar">

        <!-- the single child size -->
        <attr name="singleSrcSize" format="dimension" />
        <!-- the bounce animation one-way duration -->
        <attr name="speed" format="integer" />
        <!-- the child count -->
        <!-- <attr name="count" format="integer" min="1" /> -->
        <!-- the progress child shape -->
        <attr name="shape" format="enum">
            <enum name="original" value="0" />
            <enum name="circle" value="1" />
            <enum name="pentagon" value="2" />
            <enum name="rhombus" value="3" />
            <enum name="heart" value="4" />
        </attr>
        <!-- the progress drawable resource -->
        <attr name="src" format="reference|color"></attr>
    </declare-styleable>

More

More detail please see blog: http://blog.csdn.net/bbld_/article/details/41246247