title: Fill ListView from JSON data
body: <p>I want to retrieve data by using Json and set it in listview. when I used textview </p>
  
  <pre><code>ans = (TextView) findViewById(R.id.answere);
  ans.setText(jsonObject.getString("responses").trim());
  </code></pre>
  
  <p>it was work correctly but when I used listview it did not work!!
  picture here show a lot of tries and some of these I put it as a comment. 
  <a href="https://i.stack.imgur.com/FzCCW.png" rel="nofollow noreferrer">enter image description here</a>
  and these are my tries</p>
  
  <pre><code>jsonObject = new JSONObject(response);
                     // String encoded = URLEncoder.encode(String.valueOf(jsonObject), "UTF-8");
                     // Log.e("UTF 8",encoded );
                     // list.add(edit.getText().toString());
                     // edit.setText("");
                      //adapter.notifyDataSetChanged();
                     // ans.setText(jsonObject.getString("responses").trim());
                     // ans= new String(jsonObject.getString("responses").trim().getBytes("ISO-8859-1"), "UTF-8");
                     //last update
                      /*
                      ans=jsonObject.getString("responses").toString().trim();
                      list.add(ans);
                      setListAdapter(adapter);//end of last update */
                      JSONArray arr = new JSONArray(response);
                      //List&lt;String&gt; list2 = new ArrayList&lt;String&gt;();
                      for(int i = 0; i &lt; arr.length(); i++){
                          String info = arr.getJSONObject(i).getString("responses").trim();
                          list.add(info);
                          adapter.notifyDataSetChanged();
                          setListAdapter(adapter);
  </code></pre>
  
  <p>what is wrong?? </p>