亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

android 簡單圖片動畫播放的實例代碼

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

xml中:

復制代碼 代碼如下:

        <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中:
復制代碼 代碼如下:

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

mAlphaAnimation.setDuration(1000);// 設定動畫時間
mAlphaAnimation.setRepeatCount(Animation.INFINITE);//定義動畫重復時間
mAlphaAnimation.setRepeatMode(Animation.REVERSE);//通過設置重復時間定義動畫的行為
mTouchView.setAnimation(mAlphaAnimation);
mAlphaAnimation.start();

相關文章

最新評論