當前位置:九游会j9娱乐平台-九游ag登录中心网址 » 安卓系統 » android雪花

android雪花-九游会j9娱乐平台

發布時間: 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);
}*/
}

熱點內容
發布:2024-07-17 17:13:27 瀏覽:872
phpjava交互 發布:2024-07-17 16:58:57 瀏覽:356
resin下jsp不能正常編譯 發布:2024-07-17 16:34:44 瀏覽:229
sqlserver如何切換主備伺服器 發布:2024-07-17 16:23:02 瀏覽:299
mc18伺服器ip 發布:2024-07-17 16:23:02 瀏覽:379
仙境傳說手游腳本 發布:2024-07-17 16:09:24 瀏覽:691
matlab命令窗口和新建腳本 發布:2024-07-17 15:51:26 瀏覽:375
建ftp文件夾 發布:2024-07-17 15:51:26 瀏覽:955
魔獸撿物腳本 發布:2024-07-17 15:27:56 瀏覽:130
開發ip伺服器 發布:2024-07-17 15:24:42 瀏覽:388
网站地图