Here is my AnimationDrawable: res/anim/my_anim.xml <?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/ android" android:oneshot="false"> <item android:drawable="@drawable/empty" android:duration="250" /> <item android:drawable="@drawable/nont_empty" android:duration="250" /> </animation-list>
Here is how I use it from the drawing thread, which is implemented as an inner class of my SurfaceView subclass: AnimationDrawable ad = (AnimationDrawable) getResources().getDrawable (R.anim.my_anim); ad.setCallback(MyView.this); ad.draw(canvas); ad.start(); this only draws the first frame of the animation and nothing else. Thank you. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---