Android Downloading Multiple images from Internet
I am trying to download multiple images from internet(number is big 50+) I am creating an Ansynch task for each image and start the download and show the downloaded images in a grid. Since I am using the Grid view as soon as i come into the my GridActivity the getView method is called and it starts the Downloading. Now many times the co开发者_运维技巧de fails giving a socket error. The algo is -
getView{
call the Asynch Task
}
AsyncTask(){
start the download
once download finsishes update the grid view image
}
AsycTask is good choice have you looked at this multithreading-for-performance, If not then it is a good tutorial to handle what you're trying accomplish.
Here is your answer: http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html
I hope that solved your problem
Very good, powerful, simple to use library to consider: Picasso.
精彩评论