[Android] 代码实现按钮/图片自旋转(中心旋转)
16lz
2021-01-23
[Android] 代码实现按钮/图片自旋转(中心旋转)
//Howard 2017-06-27final RotateAnimation animation = new RotateAnimation(0.0f, 180.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);animation.setDuration( 500 );btnSwap.startAnimation( animation );
//下面这种做法不起作用//btnSwap.setAnimation( animation );//animation.startNow();
更多相关文章
- Android 按钮添加单击事件
- Android 音量增加减少按钮事件
- Android对话框的高级设置《二》设置对话框按钮的透明度和对话框
- Android中的集中常用布局方式和按钮事件的处理方式
- Android沉浸式状态栏和手机虚拟按钮不兼容冲突的
- android 设置Button为圆形按钮
- 星星CheckBox按钮
- android背景选择器selector用法、自定义Button按钮样式
- Android中的Shape使用总结—圆角的按钮