加载Gif图片要对图片信息进行解帧等操作。具体请参考Android应用开发揭秘中的内容。

解决方案 »

  1.   

    This is a common question asked by new game developers. I assume it is some sort of animation for a game. An animated GIF is simple a set of frames stored in a file, what you really want to do is to get a program from download.com or somewhere that can split your gif into separate files for each frame.frame1.png
    frame2.png
    frame3.png
    frame4.pngLoad these files as an array of Bitmaps, then display them in sequence.canvas.drawBitmap(frames[i], x, y, null);
    i++;Each time through your paint loop the next frame will be drawn.
      

  2.   

    多谢 不过android系统内存一次性加载图片数量是有限的,否则会内存溢出,死机!