title: (Priority) How do i use setListAdapter for a specific ListView in FragmentActivity
body: <p>I am just programming a data evaluation app for a hydropower station.
  There i need to download the data from the server, which ist lying there - as a MySQL table, formatted to a JSON-array.
  Now after umpteen hours of work i've done it to connect to the server, download the data and to output it in a auto-generated ListView Layout (with <em>this.setListAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, results));</em> )</p>
  
  <p>But this was just a testapplication for the connection. </p>
  
  <p>In the main app i need the dataoutput from the server in a specifiv ListView in one of the Fragments. After again trying around some hours without any success I decided to ask you.
  The setListAdapter is not working in a FragmentActivity anymore.</p>
  
  <p>And another question: Is it possible to save those data in specific variables, after downloading it from our server?</p>
  
  <p>Greetings from beatiful Austria,
  Duned</p>
  
  <pre><code>package at.duned.hydroevaluation;
  
  import android.support.v4.app.Fragment;
  import android.os.Bundle;
  import android.os.StrictMode;
  import android.os.StrictMode.ThreadPolicy;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import java.io.BufferedReader;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.util.ArrayList;
  import org.apache.http.HttpEntity;
  import org.apache.http.HttpResponse;
  import org.apache.http.NameValuePair;
  import org.apache.http.client.HttpClient;
  import org.apache.http.client.entity.UrlEncodedFormEntity;
  import org.apache.http.client.methods.HttpPost;
  import org.apache.http.impl.client.DefaultHttpClient;
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  import android.util.Log;
  import java.util.List;
  import android.view.Menu;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  import android.widget.TextView;
  
  
  public class Fragment2_DataOutput extends Fragment {
  
  InputStream is;
  ArrayList&lt;String&gt; results =new ArrayList&lt;String&gt;();
  JSONObject json_data;
  TextView tw09;
  ListView list;
  
  
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
  
  
      super.onCreate(savedInstanceState);
  
      View V=inflater.inflate(R.layout.fragment_2_dataoutput,container, false);
  
      TextView tw09 = (TextView)V.findViewById(R.id.TextView09);
      ListView list = (ListView)V.findViewById(R.id.list);
  
      StrictMode.ThreadPolicy policy = new
              StrictMode.ThreadPolicy.Builder()
              .permitAll().build();
              StrictMode.setThreadPolicy(policy);
      getData();
  
      //tw09.setText((CharSequence) is);
  
      return V;
  }
  
  
  
  
  
  private void getData() {
  
      String result = "";
          ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
  
  
          try{
          HttpClient httpclient = new DefaultHttpClient();
          HttpPost httppost = new HttpPost("http://patrickhartl.lima-city.de/eva1.php");
          httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
          HttpResponse response = httpclient.execute(httppost);
          HttpEntity entity = response.getEntity();
          is = entity.getContent();
          }catch(Exception e){
          Log.e("log_tag", "Fehler bei der http Verbindung "+e.toString());}
  
  
  
  
  try{
          BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
          StringBuilder sb = new StringBuilder();
          String line = null;
          while ((line = reader.readLine()) != null) {
          sb.append(line + "n");
          } 
          is.close();
          result=sb.toString();
          }catch(Exception e){Log.e("log_tag", "Error converting result "+e.toString());}
  
  
  
  
  try{
          JSONArray jArray = new JSONArray(result);
          for(int i=0;i&lt;jArray.length();i++){
          json_data = jArray.getJSONObject(i);
          results.add((String) json_data.get("Messdaten") + " "+ json_data.get("Wert") + " " + json_data.get("Einheit"));
          } 
          fillList();
          }
          catch(JSONException e){
          Log.e("log_tag", "Error parsing data "+e.toString());
          }
          }
  
  
  
  public void fillList() {
      this.setListAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, results));
  }
  }
  </code></pre>