title: How to create views dynamically from json in android listview?
body: <p>I want to create radio button,checkbox,spinner dynamically from web service. Below is my response.</p>
  
  <pre><code>{
      "getSurvey": {
          "ErrorCode": "0",
          "Result": "Success",
          "Response": [
              {
                  "SurveyId": "91",
                  "SurveyName": "Sample Survey",
                  "Questions": [
                      {
                          "QuestionId": "553",
                          "QuestionText": "&lt;p style=\"margin: 0px; text-align: left;\"&gt;Are you satisfied with Cement Quality?&lt;/p&gt;",
                          "Type": "RadioButtonList",
                          "Mandatory": "Y",
                          "OptionValue": [
                              {
                                  "AnswerId": "2220",
                                  "AnswerValue": "Excellent"
                              },
                              {
                                  "AnswerId": "2221",
                                  "AnswerValue": "Good"
                              },
                              {
                                  "AnswerId": "2222",
                                  "AnswerValue": "Satisfactory"
                              },
                              {
                                  "AnswerId": "2223",
                                  "AnswerValue": "Poor"
                              }
                          ]
                      },
                      {
                          "QuestionId": "554",
                          "QuestionText": "How will you rate Cement? (0= Lowest and 7= Highest)&amp;nbsp;",
                          "Type": "DropDownList",
                          "Mandatory": "Y",
                          "OptionValue": [
                              {
                                  "AnswerId": "2224",
                                  "AnswerValue": "0"
                              },
                              {
                                  "AnswerId": "2225",
                                  "AnswerValue": "1"
                              },
                              {
                                  "AnswerId": "2226",
                                  "AnswerValue": "2"
                              },
                              {
                                  "AnswerId": "2227",
                                  "AnswerValue": "3"
                              },
                              {
                                  "AnswerId": "2228",
                                  "AnswerValue": "4"
                              },
                              {
                                  "AnswerId": "2229",
                                  "AnswerValue": "5"
                              },
                              {
                                  "AnswerId": "2230",
                                  "AnswerValue": "6"
                              },
                              {
                                  "AnswerId": "2231",
                                  "AnswerValue": "7"
                              }
                          ]
                      },
                      {
                          "QuestionId": "555",
                          "QuestionText": "What Kind of issues you face while Delivery?",
                          "Type": "ListBox",
                          "Mandatory": "Y",
                          "OptionValue": [
                              {
                                  "AnswerId": "2232",
                                  "AnswerValue": "Logistic Issue"
                              },
                              {
                                  "AnswerId": "2233",
                                  "AnswerValue": "Material Handeling "
                              },
                              {
                                  "AnswerId": "2234",
                                  "AnswerValue": "Stock not available"
                              },
                              {
                                  "AnswerId": "2235",
                                  "AnswerValue": "Wastage of Cement"
                              },
                              {
                                  "AnswerId": "2236",
                                  "AnswerValue": "Others"
                              }
                          ]
                      },
                      {
                          "QuestionId": "559",
                          "QuestionText": "Do you like Cement?",
                          "Type": "CheckBoxList",
                          "Mandatory": "Y",
                          "OptionValue": [
                              {
                                  "AnswerId": "2237",
                                  "AnswerValue": "Yes"
                              },
                              {
                                  "AnswerId": "2238",
                                  "AnswerValue": "No"
                              }
                          ]
                      }
                  ]
              }
          ]
      }
  } 
  </code></pre>
  
  <p>Based on type i need to create views dynamically. Please someone give me the idea or solution how to achieve this. After created views dynamically i need to get all the selected values from created views. </p>
  
  <p>Thanks.  </p>