安卓_动画
来源:互联网 发布:重庆网络有限 编辑:程序博客网 时间:2024/05/16 09:49
****布局
<ImageView
android:id="@+id/IV"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/b" />
****MainActivity
IV = (ImageView) findViewById(R.id.IV);
//旋转
RotateAnimation animRotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f
, Animation.RELATIVE_TO_SELF, 0.5f);
animRotate.setDuration(1000);//时间
animRotate.setFillAfter(true);//保持状态
//缩放
ScaleAnimation animation1 = new ScaleAnimation(0, 1, 0, 1, Animation.RELATIVE_TO_SELF, 0.5f
, Animation.RELATIVE_TO_SELF, 0.5f);
animation1.setDuration(1000);
animation1.setFillAfter(true);
//渐变
AlphaAnimation animation2 = new AlphaAnimation(0, 1);
animation2.setDuration(2000);
animation2.setFillAfter(true);
//动画集合
AnimationSet set = new AnimationSet(false);
set.addAnimation(animation1);
set.addAnimation(animation2);
set.addAnimation(animRotate);
IV.startAnimation(set);
阅读全文
0 0
- 安卓_动画
- 安卓_动画_帧动画
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 【安卓开机动画】变形金刚4_变身暴…
- 安卓_异常_
- 安卓 动画帧动画基础动画
- 安卓开发-动画
- 安卓动画总结
- 安卓 动画效果
- 如何做到防止SQL注入
- MySQL binlog相关分析
- Find the hotel(HDU-3193) (RMQ)
- 【leetcode】第47题 Permutations II(非递归法)题目+解析+代码
- VS项目-属性小技巧
- 安卓_动画
- Android逆向之smali注入
- VMware Workstation Pro 虚拟机安装系统注意事项
- 关于CDH页面下载HDFS文件地址解析出错
- git初步使用
- 关于win,linux下firefox以及谷歌内核浏览器网页播放视频的问题及解决方案
- Android实现黑白主题切换
- 苹果个人开发者修改开发商名称
- 十年之后再看“面向对象”