An open API service indexing awesome lists of open source software.

https://github.com/pythoncat1024/animatorbutton

android 自定义控件 动画按钮
https://github.com/pythoncat1024/animatorbutton

Last synced: 9 months ago
JSON representation

android 自定义控件 动画按钮

Awesome Lists containing this project

README

          

# AnimatorButton
android 自定义控件 动画按钮
* thanks for [lygttpod/AndroidCustomView](https://github.com/lygttpod/AndroidCustomView)
* thanks for [ Android 动画之集合动画AnimatorSet](http://blog.csdn.net/qqxiaoqiang1573/article/details/53112584)

模仿[Android自定义动画酷炫的提交按钮](http://www.jianshu.com/p/3eb9777f6ab7)的一次实战。

效果还不错。代码还需要优化。

已经将其做成lib库,可以直接使用:

gradle:
1. in project build.gradle



allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}



2. in app module build.gradle


dependencies {
compile 'com.github.pythoncat1024:AnimatorButton:0.0.1'
}



3. in xml











4. in Activity



ab = (AnimatorButton) findViewById(R.id.btn_animate);
ab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ab.start(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplication(), "ok", Toast.LENGTH_SHORT).show();
}
});
}
});