开发者

how to dispaly image in grid view reading imageUrl from xml using sax parser in android [duplicate]

This question already has answers here: 开发者_运维问答 Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜