【问题标题】:populate listview with custom cursoradapter from sqlite使用来自 sqlite 的自定义 cursoradapter 填充列表视图
【发布时间】:2014-10-13 07:30:01
【问题描述】:
  1. 创建包含多个表的数据库。

  2. 数据应该以 JSON 格式从服务器获取,并在安装应用程序时插入到 sqlite 表中。

  3. 一旦 JSON 被提取到 sqlite 中,ListViews 应该填充自定义光标适配器。 ListView 有图片、标题、标题描述。

  4. Json 将来会更新,所以我想将更新后的 JSON 对象(仅)获取到 sqlite 行并显示在相应的列表视图中。

请建议我最好的方法来做到这一点。提前致谢。

我的 JSON 格式:

[{ 
    "Sermons Youtube ID" : "xxxxx",
    "Speaker" : "xxxxx",
    "node_title" : "xxxxxx",
    "Video_Length" : "xxxxx",
    "Image_Thumbnail" : "xxxx.png"
},
{
    "Sermons Youtube ID" : "xxxxx",
    "Speaker" : "xxxxx",
    "node_title" : "xxxxxx",
    "Video_Length" : "xxxxx",
    "Image_Thumbnail" : "xxxx.png"
},
{
    "Sermons Youtube ID" : "xxxxx",
    "Speaker" : "xxxxx",
    "node_title" : "xxxxxx",
    "Video_Length" : "xxxxx",
    "Image_Thumbnail" : "xxxx.png"
},
{
    "Sermons Youtube ID" : "xxxxx",
    "Speaker" : "xxxxx",
    "node_title" : "xxxxxx",
    "Video_Length" : "xxxxx",
    "Image_Thumbnail" : "xxxx.png"
 }]

【问题讨论】:

    标签: android json android-sqlite


    【解决方案1】:

    你可以参考这个例子, 希望对你有帮助 JsonParsing 和 Sqlite 数据库 http://www.c-sharpcorner.com/UploadFile/1e5156/jsonparsing-and-sqlite-database-in-android-using-android-stu/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多