Making an animation with BitmapDrawable

Discussion in 'Application Development' started by __Jon__, Oct 5, 2010.

  1. __Jon__

    __Jon__ Member
    15

    Aug 16, 2010
    15
    0
    15
    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
    26

    Sep 5, 2011
    12
    2
    26
    You can use <animation-list>
     

Share This Page

Loading...