开发者

Reverse image load order?

First Question

I use Lazy load of images in ListView to load images in a ListView and a GridView. It works but the images are lo开发者_开发百科aded form bpttom to top. How to fix that?

Bonus Question

Can I use a loading animation in a image view while the real image is loaded? Right now it's just a default image.


In ImageLoader.java you could replace

photoToLoad=photosQueue.photosToLoad.pop();

with

photoToLoad=photosQueue.photosToLoad.get(0);
photosQueue.photosToLoad.remove(photoToLoad);

It will change the order.

To display ProgressBar you can just add it to item.xml. Initially ProgressBar is visible and image is hidden. After bitmap is downloaded you hide ProgressBar and show image. But I would not recommend doing that. While images are being decoded in the background they consume processor power and all your progress bars may be freezing sometimes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜