TheOnoy123
TheOnoy123

Reputation: 27

android - frame animation in value/arrays.xml

i have simple anim

simple_anim.xml

<animation-list xmlns:android=”http://schemas.android.com/apk/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>

Upvotes: 1

Views: 764

Answers (1)

Matthew Patience
Matthew Patience

Reputation: 11

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.

Upvotes: 1

Related Questions