【发布时间】:2017-12-11 10:43:24
【问题描述】:
我的 JSON 看起来像这样。我只需要在片段的布局中设置这些值。以便显示有关此产品的详细信息。
{
"adid": 5,
"uid": 1130,
"userName": "Maëly",
"cid": 5,
"brand": null,
"model": null,
"title": "Nummular dermatitis",
"description": "Nam sa dea ss "
"address": "9795 Debra Center",
"price": 1544,
"photo1": "../../../img/mobile/oneplus/3t/3t-1.jpg",
"photo2": null,
"photo3": null,
"photo4": null,
"ip_add": null,
"created": 1493921700000,
"expiryDate": null,
"published": true,
"sold": null,
"featured": true,
"cond": true,
"price_neg": true,
"used_for": "8",
"views": 1575,
"city": "Kathmandu",
"landmark": null,
"quality": null,
"alert": null,
"features": [
]
}
【问题讨论】:
-
添加您尝试过的代码。
-
请参考以下链接获取帮助json to refrofit conversion
-
MuthuKrishnan 先生,我有一个 pojo 类、ApiInterface 和 ApiClient 以及一个带有片段活动的空白片段来显示结果。我添加了一些代码。
标签: android android-studio android-fragments retrofit retrofit2