开发者

how to get images from an xml file stored as an url in android

in my app i am trying to show some images in a grid view manner. normally i know to show grid view for the images stored in drawables.

When the activity opens it hits an url and gets back an xml file. The images are stored in this xml file as follows.

<Search>
  <Searchdata>
     <id>http://xxxxxxxxxxxxxxxxxxx/avatars/original/1304429263_spot.jpg</id
  </Searchdata>
  <Searchdata>
     <id>http://xxxxxxxxxxxxxxxxxxxx/avatars/original/1304429219_spot.jpg</id
  </Searchdata>
  <Searchdata>
     <id>http://xxxxxxxxxxxxxxxxxxxx/avatars/original/1304429208_spot.jpg</id
  </Searchdata>
</Search>

like this it goes on...

I am storing this xml file in a constant value and by sax parser i am getting the values in the tag <id></id>

Now how to move all the id tags to my grid views ImageAdapter class file开发者_开发技巧.

Please help me....


reefer below link

Lazy load of images in ListView

Source is available here http://open-pim.com/tmp/LazyList.zip


First you want to download these images to obtain Bitmaps that you can pass to your adapter. Check this post: Multithreading for Performance

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜