Cant add a HeaderView to a ListFragment
<p>Here is the code where I add a list to my list fragmet:</p>

<pre><code>public void onAttach(Activity activity) {
    super.onAttach(activity);
    System.err.println("Fragment Attach");
    String[] MyList = {"Item 1","Item 2","Item 3","Item 4","Item 5"};
    System.err.println("File Row ID" + Integer.toString(R.layout.file_row));
    ArrayAdapter&lt;String&gt; aa = new ArrayAdapter&lt;String&gt;(getActivity(), R.layout.file_row, MyList);

    //Trying to add a Header View.
    TextView tv = (TextView) activity.findViewById(R.layout.file_row);
    tv.setText(R.string.FileBrowserHeader);
    this.getListView().addHeaderView(tv);

    //Setting the adapter
    setListAdapter(aa);         

}   
</code></pre>

<p>However the line this.getListView().addHeaderView(tv); gives me the error</p>

<p>06-11 15:24:46.110: ERROR/AndroidRuntime(8532): Caused by: java.lang.IllegalStateException: Content view not yet created</p>

<p>And the program crashes.</p>

<p>Can anyone tell me what am I doing wrong?</p>
