开发者

android - frame animation in value/arrays.xml

开发者 https://www.devze.com 2023-03-20 17:00 出处:网络
i have simple anim simple_anim.xml <animation-list xmlns:android=”http://schemas.android.com/apk开发者_Go百科/res/android” id=”selected” android:oneshot=”false”>

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

精彩评论

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