Thursday, February 27, 2014
About ansycTask + ListView asynchronous loading image problem
Learn something of his own money to buy books, this is really not handle it!
I asyncTask + listview understanding is: start with json turn into a list, from the list loaded into the adapter, and then go adaptation listview
If the entire asynchronous loading listview I have no problem, can be achieved through the handler
Is asyncTask how to update listview inside the picture alone, indeed perplexed
Questions as follows:
1, after asyncTask loaded, is how to update the ListView is to update the ListView image tag, or the entire ListView is updated??
2, if you can help explain the way under the need to learn knowledge, I feel there are a view of the update method, I miss not learned
3, if the way the caching mechanism introduced under the picture, so much the better
Find Great God enlighten
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
http://blog.csdn.net/xiaanming/article/details/9825113 see it
Reply:
A closer look at the official one ImageCache:
http://developer.android.com/training/displaying-bitmaps/manage-memory.html
http://developer.android.com/shareables/training/BitmapFun.zip
When using the above Cache, AsyncTask be "binding" on the ImageView, when the background load images directly call ImageView's setImageDrawable to update the corresponding ImageView. When slide down, then will cancel out the first ImageView bound AsyncTask, then re-download it.
Reply:
https://github.com/nostra13/Android-Universal-Image-Loader
Reply:
Thank you do not learn
No comments:
Post a Comment