专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Android

android 图片加载解决办法

发布时间:2010-05-30 10:51:54 文章来源:www.iduyao.cn 采编人员:星星草
android 图片加载
请教一下,android怎么加载gif图片?

------解决方案--------------------
加载Gif图片要对图片信息进行解帧等操作。具体请参考Android应用开发揭秘中的内容。
------解决方案--------------------
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.png

Load 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.
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: