开发者

android - frame animation in value/arrays.xml

i have simple anim

simple_anim.xml

<animation-list xmlns:android=”http://schemas.android.com/apk开发者_Go百科/res/android” id=”selected” android:oneshot=”false”>
<item android:drawable=”@drawable/frame1″ android:duration=”50″ />
<item android:drawable=”@drawable/frame2″ android:duration=”50″ />
</animation-list>

it is possible to create frame animation in value/arrays.xml

    <?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <array name="entries">
        <item>@drawable/simple_anim</item>      
        <item>@drawable/image2</item>       
        <item>@drawable/image3</item>       
        <item>@drawable/image4</item>
        <item>@drawable/image5</item>       
    </array>    
</resources>


Technically yes. But not in the same way you would use the first one. You could start a thread that on each run displays the next image resource in your array.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜