Alex Rivera | Logout

Should I use Bitmap or Drawable to store in ImageCache on Android?

Asked 2010-09-21T09:03:59.963
9

I implemented a ImageCache. But I'm curious about what type to store in it will cost less.

Now I use BitmapFactory to get the images from the internet, so I get a Bitmap first. Should I convert to a Drawable to store in my ImageCache or just store the Bitmap is fine?

Any ideas?

Thanks.

Edit
Report

1 Answer

1

Everything depends on if you want to cache an image with different state like a selector (pressed, focused, etc). The bitmap will not contain this information compare to caching the drawable.

answered 2012-10-20T00:28:21.673

Your Answer