Skip to content
ProgressBar 漂亮的加载动画,成功与失败动画,支持动画结果回调
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea First upload Nov 1, 2016
app First upload Nov 1, 2016
gif gif Nov 3, 2016
gradle/wrapper First upload Nov 1, 2016
lovelyprogressbar First upload Nov 1, 2016
.gitattributes First upload Nov 1, 2016
.gitignore First upload Nov 1, 2016
README.md readme Nov 3, 2016
build.gradle First upload Nov 1, 2016
gradle.properties First upload Nov 1, 2016
gradlew First upload Nov 1, 2016
gradlew.bat First upload Nov 1, 2016
settings.gradle First upload Nov 1, 2016

README.md

###preview gif

###Dependency(引入)

dependencies {
	compile 'com.ljs:LovelyProgressBar:1.0.0'
}

###Usage (用法)

<com.ljs.lovelyprogressbar.LovelyProgressBar
        android:id="@+id/loadbar"
        android:layout_width="100dp"
        android:layout_height="100dp"
        custom:lineColor="@android:color/white"
        custom:lineWidth="8"
        custom:textSize="16sp"
        />

若不设置 线宽默认:8 颜色默认:Green textsize默认:16sp

LovelyProgressBar mbar=(LovelyProgressBar) findViewById(R.id.loadbar);;

mbar.startload();//设置progress前先startload()
mbar.setProgress(int progress);//设置进度

//加载成功调用即可成功动画
mbar.errorLoad();
//加载失败调用即可执行失败动画
mbar.succesLoad();

如果progress=100。自动启动succesload动画

####动画回调(Listener)

mbar.setOnLoadListener(new LovelyProgressBar.OnLoadListener() {
           @Override
           public void onAnimSuccess() {
               Toast.makeText(MainActivity.this,"Success",Toast.LENGTH_SHORT).show();
           }
           @Override
           public void onAnimError() {
               Toast.makeText(MainActivity.this,"Error",Toast.LENGTH_SHORT).show();
           }
       });

###Licence This Licence, don't need a Public Licence!i don't care! If u like the LovelyToast, give me a star, don't be such a dick, u just do what u want to do. (不需要licence,大家想怎么用怎么用,给个star即可,thanks!! )

You can’t perform that action at this time.