BounceProgressBar

Additional

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

Announcement

Android BounceProgressBar Widget


Screenshots


Usage


Add the dependency to your build.gradle.

dependencies {
    compile 'org.rocko.bpb:library:1.0.0'
}

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

License


Copyright 2014 Rocko.

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.