Making an animation with BitmapDrawable


Last Updated:

  1. __Jon__

    __Jon__ Member This Topic's Starter

    Joined:
    Aug 16, 2010
    Messages:
    15
    Likes Received:
    0
    I want to make a 5 frame animation. I got five PNGs, named frame1,frame2,... and put them into the res folder.

    I then created Bitmaps, and converted the Bitmaps into BitmapDrawables.
    And then added them to an AnimationDrawable inside an ImageView (ImV).

    Here is the code.


    Unfortunately, all that happens is the first frame of animation bmp1 is shown. It doesn't cycle through the frames.
    Could I get some advice how to do this properly?
     

    Advertisement
  2. Pabrick

    Pabrick Member

    Joined:
    Sep 5, 2011
    Messages:
    12
    Likes Received:
    2
    You can use <animation-list>
     

Share This Page

Loading...