Android中的动画
来源:互联网 发布:java计算a阶乘之和 编辑:程序博客网 时间:2024/06/05 00:57
package com.jack.wisdombj;import android.os.Bundle;import android.app.Activity;import android.view.Menu;import android.view.animation.AlphaAnimation;import android.view.animation.Animation;import android.view.animation.AnimationSet;import android.view.animation.RotateAnimation;import android.view.animation.ScaleAnimation;import android.widget.RelativeLayout;public class SplashActivity extends Activity {private RelativeLayout rlRoot;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_splash);rlRoot = (RelativeLayout) findViewById(R.id.rl_root);startAnim();}// 开启动画private void startAnim() {AnimationSet set = new AnimationSet(false);//旋转RotateAnimation rotate = new RotateAnimation(0, 360,Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,0.5f);rotate.setDuration(1000);rotate.setFillAfter(true); //缩放ScaleAnimation scale = new ScaleAnimation(0, 1, 0, 1,Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,0.5f);scale.setDuration(1000);scale.setFillAfter(true);//渐变AlphaAnimation alpha =new AlphaAnimation(0, 1);alpha.setDuration(2000);alpha.setFillAfter(true);set.addAnimation(rotate);set.addAnimation(scale);set.addAnimation(alpha);rlRoot.startAnimation(set);}}
1 0
- Android中的动画,属性动画
- Android中的动画效果
- Android中的动画详解
- Android中的动画
- Android中的动画效果 .
- Android中的动画
- android中的动画
- android中的动画
- Android中的动画
- Android中的动画
- android中的动画
- android中的动画效果
- Android中的动画效果
- Android中的动画
- Android中的属性动画
- android中的view动画
- Android中的动画资源
- Android中的属性动画
- Hibernate 学习路程之一(Hibernate 环境的搭建)
- MapReduce基础
- (20)Air Band OpenCV2.4.13_腐蚀和膨胀
- 虚拟化和虚拟机简介
- 最全的Android源码目录结构详解
- Android中的动画
- MyEclipse 破解教程
- 从尾到头输出单链表
- KVM、QEMU与libvirt介绍
- Application Not Responding
- MFC Windows程序设计--在窗口绘图
- C++ — 内联函数
- 最长公共子序列 【DP】+【最长公共子序列】
- 求先序排列