JSON 对象到 listView [英] JSON object to listView

查看:27
本文介绍了JSON 对象到 listView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 android 的新手,我想动态地将 JSON 数据实现到我的 android listView,我只有 JSON 文件中的对象,这是交易名称和折扣.

i am newbie to android, I wanted to implement dynamically JSON data to my android listView, I have only to objects in JSON file this are dealname and discount.

我检查了所有问题和教程,但是当我在应用程序中实现这些代码时,没有一个在运行.我只是想问,要实现这样的JSON数据,我是否需要解析数据并转换为String数组这么简单的listview工作,还是我需要实现自定义listview?请你的建议将有助于解决这个任务..

I checked all questions and tutorials but when i implemented those codes in application, neither one is running. I just wanted to ask, to implement such JSON data, should i need to parse data and convert into String array so simple listview work, or i need to implement custom listview? Plz your suggestions will help to solve this assignment..

提前致谢.

推荐答案

看这两个教程,在Custom ListView中显示这些Json对象,我觉得这就是你需要的,

Look at these two tutorials, In these Json object are displayed in Custom ListView, I think this is what you needed,

Android 将自定义对象放入 ListView

从 JSON 填充列表视图

这篇关于JSON 对象到 listView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆