how to dispaly image in grid view reading imageUrl from xml using sax parser in android [duplicate]
Possible Duplicate:
how to display image in grid view reading imageUrl from xml using sax parser in android
thanks for answer but i am able to read xml file from url but i need if in xml imageUrl is there so show in grid view ..this is my xml file and read URL
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel>
<name>ndtv</name>
<logo>http://a3.twimg.com/profile_images/670625317/aam-logo--twitter.png</logo>
<description>this is a news Channel</description>
<rssfeed>ndtv.com</rssfeed>
</channel>
<channel>
<name>star news</name>
<logo>http://a3.twimg.com/profile_images/740897825/AndroidCast-350_normal.png</logo>
<description>this is a newsChannel</description>
<rssfeed>starnews.com</rssfeed>
</channel>
</channels>
There is a tutorial on SAX parsing here, an example of HttpClient here, and a tutorial on GridView here.
You'll need to parse your XML, store your URLs in a list, retrieve those URLs using HttpClient, load the images in to Bitmap objects, and set your ImageView objects in your getView()
method of your Adapter
using imageView.setImageBitmap()
.
Sorry for the very broad answer, but it's a very broad question.
精彩评论