SmallBang

介绍:

针对任意视图的twitter like动画。

运行效果:

使用说明:

0.  在 build.mSmallBang.bang(view); 文件中添加如下:

dependencies {
    compile 'hanks.xyz:smallbang-library:0.1.2'
}

1. 初始化 SmallBang

mSmallBang = SmallBang.attach2Window(this);

2. 向view添加动画

mSmallBang.bang(view);

或者

mSmallBang.bang(view,new SmallBangListener() {
    @Override
    public void onAnimationStart() {
    }
    @Override
    public void onAnimationEnd() {
        toast("button +1");
    }
});

或者

mSmallBang.bang(view,50,new SmallBangListener() {
    @Override
    public void onAnimationStart() {
    }
    @Override
    public void onAnimationEnd() {
        toast("text+1");
    }
});

其它方法

/**
  * set different colors for dots, the length should be 2 at least, colors\[0\] and colors\[1\] are Big Circle startColor and endColor;
  *
  * @param newColors
  */
 public void setColors(int\[\] newColors)
 /**
  * set small dot number
  * @param dotNumber
  */
 public void setDotNumber(int dotNumber);
已下载
0