Android: How to call ListActivity methods for class that extends MapActivity?
<p>I am trying to create a class that uses both a ListView and MapView. I originally wrote the class to extend ListActivity. However, I later found out that I would need to extend MapView and then reference the ListView if I wanted to combine the two.</p>

<p>So, this is how is is now declared:</p>

<pre><code>public class MapListActivity extends MapActivity {
</code></pre>

<p>Next I figured I needed a way to get at the ListView so I wrote this:</p>

<pre><code>//instance vars
ListView listView;

//get ref to listview
listView = (ListView) findViewById(android.R.id.list);
</code></pre>

<p>In line with the old code I added: </p>

<pre><code>    listView.setListAdapter(adapter);

    // selecting single ListView item
    listView.getListView();
</code></pre>

<p>However, the error I get is that the method setListAdapter(ListAdapter) is undefined for the type MapListActivity or ListView. This makes sense for the MapView because the class extends MapActivity but I am not sure how to get it to work now that the class no longer extends ListActivity?</p>

<p>Any help appreciated.</p>
