简体   繁体   English

解析 android 中的一个 plist 并在列表视图中显示数据

[英]Parse a plist in android and display data in the list view

I am beginner in android, my requirement is to parse a plist file and display its result in the list view.我是 android 的初学者,我的要求是解析一个 plist 文件并在列表视图中显示其结果。

List view contains an icon image, Name of the icon and an image button which shows price to buy that icon.列表视图包含一个图标图像、图标名称和一个显示购买该图标价格的图像按钮。

I am struggling from few days on this, can anybody let me know the solution?我为此苦苦挣扎了几天,有人可以告诉我解决方案吗?

Thanks in advance,提前致谢,

Tejaswi Marakini特贾斯维·马拉基尼

As plist contains xml, you should use xml parser for that.由于 plist 包含 xml,因此您应该为此使用 xml 解析器。 User SAX or Pull parser.用户 SAX 或 Pull 解析器。 Use custom list adapter to show the content in ListView使用自定义列表适配器在 ListView 中显示内容

Have a look on these examples看看这些例子

http://android-er.blogspot.com/2010/04/simple-rss-reader-in-listview.html http://android-er.blogspot.com/2010/04/simple-rss-reader-in-listview.html

http://p-xr.com/android-tutorial-how-to-parseread-xml-data-into-android-listview/ http://p-xr.com/android-tutorial-how-to-parseread-xml-data-into-android-listview/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM