Giter Club home page Giter Club logo

lovelyprogressbar's Introduction

###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!! )

lovelyprogressbar's People

Contributors

anderson9 avatar

Watchers

Neil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.