Android Frame by Frame Animation problem on elements in a CursorAdapter

Posted by Pandalover on Stack Overflow See other posts from Stack Overflow or by Pandalover
Published on 2009-11-26T12:09:32Z Indexed on 2012/11/08 23:01 UTC
Read the original article Hit count: 241

Filed under:
|
|

I am having trouble applying an animation to a View. I am trying to load the animation from inside the constructor of a CursorAdapter, so I can set it later assign it to certain children in the list.

In the constructor I have :

shineAnimation = AnimationUtils.loadAnimation(ctx, R.anim.news_list_item_shine);

the animation is in my res/anim dir

<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="true">
    <item android:drawable="@drawable/shine1" android:duration="200" />
    <item android:drawable="@drawable/shine2" android:duration="200" />
    <item android:drawable="@drawable/shine3" android:duration="200" />
    <item android:drawable="@drawable/shine4" android:duration="200" />
    <item android:drawable="@drawable/shine5" android:duration="200" />
</animation-list>

I'm getting an exception : Unknown animation name: animation-list

Help would be much appreciated

Thanks S

© Stack Overflow or respective owner

Related posts about java

Related posts about android