当前位置:首页 » 安卓系统 » android雪花

android雪花

发布时间: 2024-06-23 13:03:45

① android 鑳藉湪灞忓箷涓婄粯涓寮犲皬锲剧墖锛岀劧钖庨忔槑鑳屾櫙锛岃缮鑳芥搷浣滆兘鐪嫔埌镄勮儗鏅妗岄溃锲炬爣鎴栫▼搴忋

package com.qdsx.cml;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
//import android.view.animation.AnimationUtils;
import android.view.animation.RotateAnimation;
import android.view.animation.ScaleAnimation;
import android.view.animation.TranslateAnimation;
import android.widget.ImageView;
public class TestdonghuaActivity extends Activity {
private ImageView tweenMM;
// private Animation animation;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tweenMM =(ImageView)findViewById(R.id.imageView1);
}

//娓愬彉
public void BtnAlphaOnClick(View view){
//this.doStartAnimation(R.anim.alpha_animation);
Animation b = new AlphaAnimation(0.1f, 1.0f);
b.setDuration(2000);
tweenMM.startAnimation(b);
}
//镞嬭浆
public void BtnrotateOnClick(View view){
//this.doStartAnimation(R.anim.rotate_animation);
Animation c = new RotateAnimation(0, 360,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
c.setDuration(3000);
tweenMM.startAnimation(c);
}
//缂╂斁
public void BtnScaleOnClick(View view){
//this.doStartAnimation(R.anim.scale_animation);
Animation d = new ScaleAnimation(0f, 1f, 0f, 1f, Animation.RELATIVE_TO_SELF,0.5f, Animation.RELATIVE_TO_SELF,0.5f);
d.setDuration(3000);
tweenMM.startAnimation(d);
}
//浣岖Щ
public void BtnTransalteOnclick(View view){
//this.doStartAnimation(R.anim.translate_animation);
Animation a= new TranslateAnimation(0, 100, 0, 100);
a.setDuration(5000);
a.setFillAfter(true);//浣垮浘鐗囩Щ锷ㄥ悗锲哄畾
tweenMM.startAnimation(a);
}

//寮濮嫔姩鐢绘柟娉
/* private void doStartAnimation(int animid){
animation = AnimationUtils.loadAnimation(this, animid);
animation.setFillAfter(true);//浣垮浘鐗囩Щ锷ㄥ悗锲哄畾
tweenMM.startAnimation(animation);
}*/
}

热点内容
php办公系统 发布:2025-07-19 03:06:35 浏览:899
奥德赛买什么配置出去改装 发布:2025-07-19 02:53:18 浏览:40
请与网络管理员联系请求访问权限 发布:2025-07-19 02:37:34 浏览:189
ipad上b站缓存视频怎么下载 发布:2025-07-19 02:32:17 浏览:844
phpcgi与phpfpm 发布:2025-07-19 02:05:19 浏览:527
捷达方向机安全登录密码是多少 发布:2025-07-19 00:57:37 浏览:692
夜魔迅雷下载ftp 发布:2025-07-19 00:39:29 浏览:99
增值税票安全接入服务器地址 发布:2025-07-19 00:20:45 浏览:486
solidworkspcb服务器地址 发布:2025-07-18 22:50:35 浏览:822
怎么在堆叠交换机里配置vlan 发布:2025-07-18 22:42:35 浏览:630