Andoird旋转动画
来源:互联网 发布:昂楷科技 知乎 编辑:程序博客网 时间:2024/06/18 15:04
今天在工作中遇到一个需求是一个登录页面在登录加载过程中,让上方的圆角图片旋转成一个类似进度条的效果
给图片设置一个旋转动画在anim文件夹中,代码如下:
<rotate xmlns:android="http://schemas.android.com/apk/res/android" android:duration="800" android:fromDegrees="0" android:pivotX="50%" android:pivotY="50%" android:repeatCount="infinite" android:repeatMode="restart" android:toDegrees="359" ></rotate>
接着在代码中开启动画,并设置停留在当前位置
animation = AnimationUtils.loadAnimation(this, R.anim.login_load_anim);LinearInterpolator lin = new LinearInterpolator();// 设置匀速animation.setInterpolator(lin);animation.setFillAfter(true); //停留在当前位置avatar_rangle.setAnimation(animation);animation.start();
0 0
- Andoird旋转动画
- Andoird ValueAnimator 实现动画
- 旋转动画
- 旋转动画
- 动画旋转
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 动画之旋转动画
- 旋转动画加载, 旋转角度
- Android 动画 - RoateAnimation 旋转动画
- Android动画之旋转动画
- 相机旋转动画
- custom ProgressBar|动画 旋转
- 配置iptables时防止自己被墙的的姿势
- 日报评分系统
- Spring入门学习(一)
- MonkeyRunner相关API使用
- 用JSP+servlet实现文件的上传与下载
- Andoird旋转动画
- ImageButton的焦点及事件处理,有个疑问onFocus为什么不Change?
- react生命周期
- ng-click 事件获取dom元素 angular
- 14.0.1 zeroice Grid 功能和架构描述
- Bootstrap 输入框组
- 2036 改革春风吹满(多边形的面积)
- JAVA 图像处理库 Thumbnailator
- Spring入门学习(二)