开发者

Advance XML parsing in android

Hey guys i am new to android development, I am developing a project which uses XML file from web to list data.But a开发者_JS百科s i said its advance, i am displaying a list of item from index.XML(this file have index of topics) which is displayed on app. i am able to display the data from index.xml.

now i want that when someone click on the item it downloads another XML and shows it. I am not able to make these index data clickable nor i am getting any idea how to display the data from other (you can call sub xml file) XMl files.

help me please

INDEX XML(don't go with name) http://aakashqq.x10.mx/temp.xml

Sub XML files: InspireProgress.com/cricket.xml InspireProgress.com/hockey.xml InspireProgress.com/lacrosse.xml

AIM:in short i want app to display index from main XML file, when user clicks on any item it open up's a new sub XML and display Prob: how do i get items click-able and how do i show a new sub XML accordingly


Presumably you are dumping this XML to some kind of text file where you should initialise proper GUI controls from the XML.

Simply design an interface which will meet your requirements, then work on code to populate the interface with necessary controls by feeding it events from the XML (SAX is an excellent choice here).


Use the data from the index to create a ListActivity. You can overload onListItemClick to retrieve the data for the item clicked and display it in a new Activity (whatever kind is suited for the data you want to display). When the user finishes with that activity, the app will return to the index.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜