title: JSonarray to Arraylist and Arraylist in ListAdapter doesn't work. (In Android)
body: <p>I've got a little problem, and i don't see it.</p>
  
  <p>I retrieve Json data (the <code>JSONArray</code>) and i wanted to make a <code>List</code> of all the names in the <code>JSONArray</code>, something like this.</p>
  
  <pre><code>List list = new ArrayList&lt;String&gt;();
  for(int i=0;i &lt; data.length();i++){ 
      list.add(data.getJSONObject(i).getString("names").toString());
  }
  </code></pre>
  
  <p>And i wanted to take this list in an `ListView' so i did this : </p>
  
  <pre><code>ArrayList&lt;String&gt; test = history_share.list;
  names_list = (String[]) test.toArray();
  ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter(this, 
      android.R.layout.simple_list_item_1, names_list);
  setListAdapter(adapter);
  </code></pre>
  
  <p>(history_share is one of the method i created to take json data from an api .
  Eclipse doesn't see any error, and me neither. </p>
  
  <p>Can somebody help me please ?</p>