欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

android 簡(jiǎn)單圖片動(dòng)畫播放的實(shí)例代碼

 更新時(shí)間:2013年06月14日 10:26:09   作者:  
android 簡(jiǎn)單圖片動(dòng)畫播放的實(shí)例代碼,需要的朋友可以參考一下

xml中:

復(fù)制代碼 代碼如下:

        <ImageView
            android:id="@+id/touchview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:src="@drawable/touch" />

java中:
復(fù)制代碼 代碼如下:

               mTouchView = (ImageView) findViewById(R.id.touchview);
                AlphaAnimation mAlphaAnimation = new AlphaAnimation(0.1f, 1.0f); ////創(chuàng)建一個(gè)AlphaAnimation對(duì)象,參數(shù)從透明到不透明

mAlphaAnimation.setDuration(1000);// 設(shè)定動(dòng)畫時(shí)間
mAlphaAnimation.setRepeatCount(Animation.INFINITE);//定義動(dòng)畫重復(fù)時(shí)間
mAlphaAnimation.setRepeatMode(Animation.REVERSE);//通過設(shè)置重復(fù)時(shí)間定義動(dòng)畫的行為
mTouchView.setAnimation(mAlphaAnimation);
mAlphaAnimation.start();

相關(guān)文章

最新評(píng)論