Java 如何在单独的行中显示每个列表元素
我怎样才能开发这个Java 如何在单独的行中显示每个列表元素,java,android,json,retrofit2,Java,Android,Json,Retrofit2,我怎样才能开发这个 "section_items": [ { "item_id": 190, "item_type": 1, "is_directive": 0, "directive_content": {}, "hints": "scientists",
"section_items": [
{
"item_id": 190,
"item_type": 1,
"is_directive": 0,
"directive_content": {},
"hints": "scientists",
"item": [
{
"data_id": 877,
"data_format_id": 1,
"data_format_value": "Why haven't Indian scientists made such headway in any field after independence ?",
"item_df_sequence": 1,
"data_identifier": null
},
{
"data_id": 878,
"data_format_id": 1,
"data_format_value": "Indian scientists are not provided with up to date laboratory facilities.",
"item_df_sequence": 2,
"data_identifier": null
},
{
"data_id": 879,
"data_format_id": 1,
"data_format_value": "Indian scientists regard that knowledge of western science advances is enough for a nation to advance.",
"item_df_sequence": 3,
"data_identifier": null
}
],
"answer_choices": [
{
"correct_answer": false,
"answer_choice_id": 4,
"choice_elements": [
{
"data_id": 883,
"data_format_id": 1,
"data_format_value": "data given in both statements I and II together are not sufficient to answer the question. ",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 1
},
{
"correct_answer": false,
"answer_choice_id": 2,
"choice_elements": [
{
"data_id": 881,
"data_format_id": 1,
"data_format_value": "data in statement II alone are sufficient to answer the question.",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 2
},
{
"correct_answer": true,
"answer_choice_id": 1,
"choice_elements": [
{
"data_id": 880,
"data_format_id": 1,
"data_format_value": "data in statement I alone are sufficient to answer the question.",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 3
},
{
"correct_answer": false,
"answer_choice_id": 3,
"choice_elements": [
{
"data_id": 882,
"data_format_id": 1,
"data_format_value": "data either in statement I alone or in statement II alone are sufficient to answer the question.",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 4
}
],
"Answer_Choice_Type": "Single Answer",
"score_type": "Item Lvl Score",
"ItemSet_Item_Key": 273,
"yet_to_visit": 0,
"filterCategory": "red",
"mark_for_review": 0,
"not_answered": 1,
"answered": 0,
"answered_marked_for_review": 0,
"seq_no": 1,
"hints_shown": "n",
"user_selected_option": []
},
{
"item_id": 194,
"item_type": 1,
"is_directive": 0,
"directive_content": {},
"hints": "Martin",
"item": [
{
"data_id": 902,
"data_format_id": 1,
"data_format_value": "Choose the options which are related to Martin Luther king",
"item_df_sequence": 1,
"data_identifier": null
}
],
"answer_choices": [
{
"correct_answer": false,
"answer_choice_id": 4,
"choice_elements": [
{
"data_id": 5,
"data_format_id": 11,
"data_format_value": "https://awspikaresources.s3.ap-south-1.amazonaws.com/TenantsDetails/Tech4india2018-06-16/TenantFilesContent/Videos/c197557324c98e22b7500569745b28f11530684091.mp4",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 1
},
{
"correct_answer": false,
"answer_choice_id": 2,
"choice_elements": [
{
"data_id": 903,
"data_format_id": 1,
"data_format_value": "In attaining our ideals,our means should be as pure as the end",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 2
},
{
"correct_answer": true,
"answer_choice_id": 1,
"choice_elements": [
{
"data_id": 9,
"data_format_id": 6,
"data_format_value": "https://awspikaresources.s3.ap-south-1.amazonaws.com/TenantsDetails/Tech4india2018-06-16/TenantFilesContent/Images/7f27faaaa7379e5b0451b942784eb6ba1530684225.jpeg",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 3
},
{
"correct_answer": false,
"answer_choice_id": 3,
"choice_elements": [
{
"data_id": 4,
"data_format_id": 10,
"data_format_value": "https://awspikaresources.s3.ap-south-1.amazonaws.com/TenantsDetails/Tech4india2018-06-16/TenantFilesContent/Audios/60662315eb02ada997639552ee14ad4e1530684068.mp3",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 4
}
],
"Answer_Choice_Type": "Single Answer",
"score_type": "Item Lvl Score",
"ItemSet_Item_Key": 276,
"yet_to_visit": 1,
"filterCategory": "gray",
"mark_for_review": 0,
"not_answered": 0,
"answered": 0,
"answered_marked_for_review": 0,
"seq_no": 2,
"hints_shown": "n",
"user_selected_option": []
},
{
"item_id": 193,
"item_type": 1,
"is_directive": 0,
"directive_content": {},
"hints": "synthesised",
"item": [
{
"data_id": 897,
"data_format_id": 1,
"data_format_value": "Which of the following is the newest element to be discovered and synthesised?",
"item_df_sequence": 1,
"data_identifier": null
},
{
"data_id": 4,
"data_format_id": 11,
"data_format_value": "https://awspikaresources.s3.ap-south-1.amazonaws.com/TenantsDetails/Tech4india2018-06-16/TenantFilesContent/Videos/61e0158cde97a6f2e3a9f3a7c5d81ccf1530684346.mp4",
"item_df_sequence": 2,
"data_identifier": null
}
],
"answer_choices": [
{
"correct_answer": false,
"answer_choice_id": 1,
"choice_elements": [
{
"data_id": 898,
"data_format_id": 1,
"data_format_value": "Flerovium (114)",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 1
},
{
"correct_answer": true,
"answer_choice_id": 4,
"choice_elements": [
{
"data_id": 901,
"data_format_id": 1,
"data_format_value": "Ununseptium (117)",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 2
},
{
"correct_answer": false,
"answer_choice_id": 2,
"choice_elements": [
{
"data_id": 899,
"data_format_id": 1,
"data_format_value": "Ununpentium (115)",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 3
},
{
"correct_answer": false,
"answer_choice_id": 3,
"choice_elements": [
{
"data_id": 900,
"data_format_id": 1,
"data_format_value": "Livermorium (116)",
"item_df_sequence": 1,
"data_identifier": null
}
],
"choosed_answer": false,
"seq_id": 4
}
],
"Answer_Choice_Type": "Single Answer",
"score_type": "Item Lvl Score",
"ItemSet_Item_Key": 275,
"yet_to_visit": 1,
"filterCategory": "gray",
"mark_for_review": 0,
"not_answered": 0,
"answered": 0,
"answered_marked_for_review": 0,
"seq_no": 3,
"hints_shown": "n",
"user_selected_option": []
},
{
"item_id": 195,
"item_type": 2,
"is_directive": 0,
"directive_content": {},
"hints": "anti-tetanus ",
"item": [
{
"data_id": 904,
"data_format_id": 1,
"data_format_value": "Blueberries cost more than strawberries",
"item_df_sequence": 1,
"data_identifier": null
},
{
"data_id": 905,
"data_format_id": 1,
"data_format_value": "Blueberries cost less than raspberries.",
"item_df_sequence": 2,
"data_identifier": null
},
{
"data_id": 906,
"data_format_id": 1,
"data_format_value": "Raspberries cost more than strawberries and blueberries",
"item_df_sequence": 3,
"data_identifier": null
},
{
"data_id": 907,
"data_format_id": 1,
"data_format_value": "If the first two statements are true, the third statement is",
"item_df_sequence": 4,
"data_identifier": null
}
],
"answer_choices": [
{
"data_id": 8,
"data_format_id": 1,
"data_format_value": "True",
"answer_choice_id": 1,
"item_df_sequence": 1,
"data_identifier": null,
"correct_answer": true,
"choosed_answer": false,
"seq_id": 1
},
{
"data_id": 9,
"data_format_id": 1,
"data_format_value": "False",
"answer_choice_id": 2,
"item_df_sequence": 2,
"data_identifier": null,
"correct_answer": false,
"choosed_answer": false,
"seq_id": 2
}
],
"Answer_Choice_Type": "Single Answer",
"score_type": "Item Lvl Score",
"ItemSet_Item_Key": 277,
"yet_to_visit": 1,
"filterCategory": "gray",
"mark_for_review": 0,
"not_answered": 0,
"answered": 0,
"answered_marked_for_review": 0,
"seq_no": 4,
"hints_shown": "n",
"user_selected_option": []
},
这是我的api。我想显示此类型的数据\u格式\u值
1.为什么印度科学家在独立后没有在任何领域取得如此大的进展?
印度科学家没有最新的实验室设施。印度科学家认为,西方科学进步的知识足以让一个国家进步
2.选择与马丁·路德·金有关的选项
3.以下哪一项是最新发现和合成的元素
如何显示上述值?首先,您必须使用此方法拆分输入字符串:
String[] separated = inputString.split(",");
separated[0];
separated[1];
seperated[2];
一旦获得分离字符串,您可以根据需要在文本视图中使用listview adapter设置字符串。这是一个动态值如何使用分离字符串在动态值中应该有一些已知的分离符,您可以在此基础上对多个字符串进行分割。请在上面提供帮助。我确信这不是原始字符串它是CDATA的一部分,显然您删除了字符串的一些重要部分,并且通过这个误导性的PPL将该值存储在数组列表中。如果您使用的是Reformation2,为什么不为该响应创建一个响应POJOclass?我获取该值,它将线性显示所有值。但我需要说明1.为什么印度科学家在独立后没有在任何领域取得如此大的进展?印度科学家没有最新的实验室设施。印度科学家认为,西方科学进步的知识足以让一个国家进步。2.选择与马丁·路德·金(Martin Luther king)相关的选项3.以下哪项是最新发现和合成的元素?