开发者

How to use bitmap from url as icon for ItemizedOverlay - WITH CACHE?

I've seen plenty of examples of how to create an ItemizedOverlay on MapView with an image from the bundle. I've seen plenty of examples of how to get a Drawable from a URL. I've even managed to 开发者_JAVA百科cobble the two together to use a drawable made from a bitmap fetched remotely. Now the problem I'm running into is how can I make that Drawable cachable?


Don't cache drawables - this can lead to memory leak.

You should cache Bitmaps and create Drawables from then when needed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜