Compilation error creating an adapter in a fragment
<p>I have a fragment which contains several views including a ListView. In order to set the adpater for the listview, I thought I'd recycle some old (working) code I'd previously written in an <em>activity</em>. The code in the activity looked something like this:</p>

<pre><code>adapter = new myadapter(
            this,
            list_of_things,
            R.layout.custom_row_view,
            new String[] {"label","day","time"},
            new int[] {R.id.text1,R.id.text3, R.id.text2}
            );
</code></pre>

<p>Where myadapter was a method within my activity's class, defined like so...</p>

<pre><code>public class myadapter extends SimpleAdapter { 
</code></pre>

<p>Now I tried to put the same myadapter method inside my fragment class and called </p>

<pre><code>adapter = new myadapter(
            this,
            list_of_things,
            R.layout.custom_row_view,
            new String[] {"label","day","time"},
            new int[] {R.id.text1,R.id.text3, R.id.text2}
            );
</code></pre>

<p>but now I get a compile time error: </p>

<pre><code>The constructor MyTestFragment.myadapter(MyTestFragment, ArrayList&lt;HashMap&lt;String,String&gt;&gt;, int, String[], int[]) is undefined
</code></pre>

<p>I don't know whether my bug could be some minor typo - or whether its something more fundamental, like not being allowed adapters within fragments.</p>
