Skip to content Skip to sidebar Skip to footer

Problems Using Bitmaps For Thumbnails

I'm trying to make an app that takes videos and then displays the videos in a gridview. I have gotten to the point where all the video thumbnails are showing up in the gridview lik

Solution 1:

2 things:

Use a ViewHolder to cache everything, as described here: Making ListView Scrolling Smooth (applies to GridViews too)

Also, use an ImageLoader to load images dynamically. There are many available or you can build your own. Here are some:

All these loaders make use of Bitmap caches as described here: Caching Bitmaps

Also, you could potentially be actually creating the thumbnail bitmaps when returning the view. This strikes me as very expensive. I would do this as a seperate step, unrelated to displaying them. For example, kick off an AsyncTask when your activity is first created to generate any new thumbnails. Then in your adapter just query the MediaStore to get the generated thumbnails.


Post a Comment for "Problems Using Bitmaps For Thumbnails"