I am following this tutorial for lazy loading listview in android.
http://www.coderzheaven.com/2012/09/23/simplest-lazy-loading-listview-android-data-populated-mysql-database-php/
But the problem is the list is loading lazyly but images are downloaded in the sequential manner as provided. i.e smaller images are not downloaded first like that.
what is they doing wrong in this tutorial?
What you’re describing could be intended behavior, if your app is targeting (and running on) API level 12 or above. If you run your code on, say, API level 9 — if your app supports it — do you see the same behavior occur? If not, that could very well be the issue.
Starting with API level 12, multiple concurrent
AsyncTasks will execute sequentially by default, to reduce the chance of unexpected errors and race conditions. If you start your tasks withexecuteOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR)rather thanexecute(), however, they will run in parallel and will not wait for preceding tasks to finish.If you’d like further reading, here’s a good post by Dianne Hackborn explaining the rationale behind it.