Android 动态渐变按钮
先上个图
看着特别炫酷吧
其实就是自定义颜色两秒轮播
动画
AnimationDrawable animationDrawable = (AnimationDrawable) button.getBackground();
// animationDrawable.setEnterFadeDuration(2000);
animationDrawable.setExitFadeDuration(2000);
animationDrawable.start();
xml
long_button_gradient
<animation-list xmlns:andro>7dp</dimen>