How To Show Image Preview While Downloading It On Android?
i want to write an app that displays images from a Cherokee webserver. I do download the images with the following code: @Override protected Bitmap doInBackground(URL... params) {
Solution 1:
Well the easiest way to do this would be to just download two images. One that is small (let's say a few bytes) and then scale it up (it will look terrible but will give the notion of progress) while loading the larger image in the background. More than likely the small one will return first and you will be able to make it appear as if it is going from low res to high res.
Solution 2:
What about 2 AsyncTask? The first one download the small or low-res image and display it on ImageView after that the first AsyncTask call the second AsyncTask which download the full-res image.
Post a Comment for "How To Show Image Preview While Downloading It On Android?"