title: ListView in Fragment Not Displayed
body: <p>I have an application where there are several tabs; interacting with any one calls upon a fragment to be displayed. Unfortunately when I switch to the below fragment, my listView does not appear, despite the fact that the list in question is populated. Thank you very much for any help you can provide.  </p>
  
  <p>The fragment's relevant code: </p>
  
  <pre><code>public class Fragment_1 extends SherlockFragment {
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
      //If time permits, I will try to make a Custom Adapter implemented with a TreeSet
      TreeSet&lt;BlacklistWord&gt; theSet =  MainActivity.getInstance().datasource.GetAllWords();
      ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
      for(BlacklistWord i :theSet){
          System.out.println(i.getWord());
          list.add(i.getWord());
      }
      Collections.sort(list);
  
      //Making BlackList 
      listView = new ListView(getActivity());
      listView.findViewById(R.id.listview);
      adapter = new ArrayAdapter&lt;String&gt;(getActivity(), android.R.layout.simple_list_item_1,  list);
      listView.setAdapter(adapter);
      ((BaseAdapter) listView.getAdapter()).notifyDataSetChanged();
      container.addView(listView);
      return inflater.inflate(R.layout.blacklist, container, false);
      //      return inflater.inflate(R.layout.blacklist, container, false);
  }
  }
  </code></pre>
  
  <p>The XML is </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  &lt;ListView
      android:id="@+id/listview"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>