¡@

Home 

2014/10/16 ¤W¤È 08:10:36

android Programming Glossary: bitmaplist

Listview shows wrong images

http://stackoverflow.com/questions/6081497/listview-shows-wrong-images

etc. What you can do though is keep a cache of Bitmaps in the listadapter. Something like this private Bitmap bitmapList private Bitmap bitmapPlaceholder private void initBitmapListWithPlaceholders call this whenever the list size changes you.. you don't need to drop all the previously loaded bitmap whenever the list contents are modified int count getListCount bitmapList new Bitmap count for int i 0 i count i bitmapList i bitmapPlaceholder private void onBitmapLoaded int position Bitmap bmp.. whenever the list contents are modified int count getListCount bitmapList new Bitmap count for int i 0 i count i bitmapList i bitmapPlaceholder private void onBitmapLoaded int position Bitmap bmp this is your callback when the load async is done..