您好,登錄后才能下訂單哦!
Android之中有 Obj 動畫 即 UI動畫 和 Image的Fragment動畫
①Image動畫
將一系列圖片照順序 排列 組成一個序列展示
XML文件存放路徑: res/anim/filename.xml
:
通過使用rescoure id進行訪問
<?xml version="1.0" encoding="utf-8"?>
<animation-listxmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<itemandroid:drawable="@drawable/rocket_thrust1"android:duration="200"/>
<itemandroid:drawable="@drawable/rocket_thrust2"android:duration="200"/>
<itemandroid:drawable="@drawable/rocket_thrust3"android:duration="200"/>
</animation-list>
使用動畫:
ImageView rocketImage =(ImageView) findViewById(R.id.rocket_p_w_picpath)
rocketImage.setBackgroundResource
(R.drawable.rocket_thrust);
rocketAnimation =(AnimationDrawable) rocketImage.getBackground()
;
rocketAnimation.start()
;
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。