我想从 Proteus 库生成级联资产。我是 android 开发的新手,在@adithya(Proteus 的开发人员)的帮助下,我设法用库构建了一个动态视图。
我想要简单的是假设有一个单选按钮的值是单选按钮我需要在单选按钮的下方添加更多资产
它就像你有孩子?如果是,下面应该加载多少个子文本框
像这样
{
"survey":[
{
"value" : "What's your name?",
"type" : "TextView",
"cascade" : "0",
"show" :"true",
"survey" : "",
"id" : "1"
},
{
"value" : "What's your age?",
"type" : "TextView",
"cascade" : "0",
"show" :"true",
"survey" : "",
"id" : "2"
},
{
"value" : "Do you have any children?",
"type" : "SelectionController",
"cascade" : "1",
"show" :"true",
"id" : "3",
"option" : [
{
"value": "YES",
"cascade": "1",
"type": "option",
"show": "false",
"id" : "3.1",
"survey": [
{
"value" : "How many children?",
"type" : "TextView",
"cascade" : "0",
"show" :"false",
"id" : "3.1.1",
"survey" : ""
},
{
"value" : "How many are married",
"type" : "TextView",
"cascade" : "0",
"show" :"false",
"id" : "3.1.2",
"survey" : ""
}
]
},
{ "value": "No",
"cascade": "0",
"type": "option",
"show": "false",
"id" : "3.2",
"survey": ""
}
]
},
{
"value" : "What's your address?",
"type" : "TextView",
"cascade" : "0",
"show" :"true",
"id" : "4",
"survey" : ""
},
{
"value" : "What is your status?",
"type" : "SelectionController",
"cascade" : "1",
"id" : "5",
"show" :"true",
"option" : [
{
"value" : "Graduate",
"type" : "option",
"cascade" : "1",
"id" : "5.1",
"show" :"false",
"survey" : [
{
"value" : "Which year?",
"type" : "TextView",
"cascade" : "0",
"show" :"false",
"id" : "5.1.1",
"survey" : ""
},
{
"value" : "Which faculty?",
"type" : "TextView",
"cascade" : "0",
"show" :"false",
"id" : "5.1.2",
"survey" : ""
}
]
},
{
"value" : "Undergraduate",
"type" : "option",
"cascade" : "1",
"show" :"false",
"id" : "5.2",
"survey" : [
{
"value" : "where are you studying?",
"type" : "SelectionController",
"cascade" : "1",
"show" :"false",
"id" : "5.2.1",
"option" : [
{
"value" : "APIIT",
"type" : "option",
"cascade" : "1",
"show" :"false",
"id" : "5.2.1.1",
"survey": [
{
"value" : "What is your GPA?",
"type" : "TextView",
"cascade" : "0",
"show" :"false",
"id" : "5.2.1.1.1",
"survey" : ""
},
{
"value" : "How was APIIT?",
"type" : "TextView",
"cascade" : "0",
"show" :"false",
"id" : "5.2.1.1.2",
"survey" : ""
}
]
},
{
"value" : "SLIIT",
"type" : "option",
"cascade" : "0",
"show" :"false",
"id" : "5.2.1.2",
"survey" : ""
},
{
"value" : "UCSC",
"type" : "option",
"cascade" : "1",
"show" :"false",
"id" : "5.2.1.3",
"survey": [
{
"value" : "How long being in UCSC?",
"type" : "TextView",
"cascade" : "0",
"show" :"false",
"id" : "5.2.1.3.1",
"survey" : ""
},
{
"value" : "How is UCSC?",
"type" : "TextView",
"cascade" : "0",
"show" :"false",
"id" : "5.2.1.3.2",
"survey" : ""
}
]
},
{
"value" : "UOM",
"type" : "option",
"cascade" : "0",
"show" :"false",
"id" : "5.2.1.4",
"survey" : ""
}
]
}
]
}
]
},
{"value" : "Are you tired of studying?",
"type" : "SelectionController",
"cascade" : "0",
"show" :"true",
"id" : "6",
"option" : [
{
"value" : "YES",
"type" : "option",
"cascade" : "1",
"show" :"false",
"id" : "6.1",
"survey": ""
},
{
"value" : "NO",
"type" : "option",
"cascade" : "0",
"show" :"false",
"id" : "6.2",
"survey" : ""
}
]
}
]
}