Build error for ArrayAdapter (Android, noob)
<p>I have a class within an Activity called Pdj . . . </p>

<pre><code>        private class ButtonListener implements View.OnClickListener {

        public void onClick(View v) {
            ListView myListView = (ListView)findViewById(R.id.pdjListView);
            EditText screen2EditText = (EditText)findViewById(R.id.pdjEditText);        
            ArrayList&lt;String&gt; todoArrayList = new ArrayList&lt;String&gt;();                
            // array adapter to bind the array to the list view
            ArrayAdapter&lt;String&gt; aa = new ArrayAdapter&lt;String&gt;(this,
                                          android.R.layout.simple_list_item_1,
                                          todoArrayList);
       . . . 
</code></pre>

<p>The last line generates the build error "The constructor ArrayAdapter(Pdj.ButtonListener, int, ArrayList) is undefined"</p>

<p>Someone else on StackOverflow reported this problem an was told to try . . . </p>

<pre><code>                ArrayAdapter&lt;String&gt; aa = new ArrayAdapter&lt;String&gt;(this.getContext(),
                                          android.R.layout.simple_list_item_1,
                                          todoArrayList);
</code></pre>

<p>... but that just produces "The method getContext() is undefined for the type Pdj.ButtonListener"</p>

<p>Thanks in advance!!</p>
