當前位置:首頁 » 安卓系統 » 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);
}*/
}

熱點內容
大型存儲櫃 發布:2025-01-17 06:08:27 瀏覽:644
發生腳本錯誤怎麼辦 發布:2025-01-17 06:03:02 瀏覽:793
刪除文件夾時顯示在另一程序打開 發布:2025-01-17 06:03:01 瀏覽:543
安卓手機怎麼裝驅動 發布:2025-01-17 06:02:17 瀏覽:622
安卓微信拍了拍怎麼改 發布:2025-01-17 05:57:31 瀏覽:46
BMF伺服器的系統服務怎麼關 發布:2025-01-17 05:50:29 瀏覽:876
免刷安卓系統怎麼進入usb調試 發布:2025-01-17 05:48:21 瀏覽:837
資料庫的三層架構 發布:2025-01-17 05:17:36 瀏覽:149
雲頂之弈有人開腳本怎麼舉報 發布:2025-01-17 05:16:59 瀏覽:682
sql包含數字 發布:2025-01-17 05:11:56 瀏覽:292