Frame by Frame Animation in Android

Posted by Unknown Selasa, 15 Januari 2013 0 komentar
Call a new xml file which includes the frames that are to be loaded:

< ?xml version="1.0" encoding="utf-8"?>
< animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
< item android:drawable="@drawable/frame_above95_1" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_2" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_3" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_4" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_5" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_6" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_7" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_8" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_9" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_10" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_11" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_12" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_13" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_14" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_15" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_16" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_17" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_18" android:duration="30"/>
< /animation-list>
in java file:

img1.setBackgroundResource(R.layout.animation_above95);
AnimationDrawable anim=(AnimationDrawable)img1.getBackground();
anim.start();
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: Frame by Frame Animation in Android
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke http://androidpopuler.blogspot.com/2013/01/frame-by-frame-animation-in-android.html. Terima kasih sudah singgah membaca artikel ini.

0 komentar:

Posting Komentar

Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android populer.