hi im wanting to know how to add google maps into a list view? i have tried it by adding into my list but i get an error that says it needs to be in a MapsActivity but my Activity already extends ListActivity is there a way i can extend multiple activities? or does anyone know how to implement google maps within a list view?
1 Answer
Java doesn't allow multi inheritance. Therefor if you need a MapActivity you can't extend the ListActivity as weel. So you want to have a listView defined on the XML.
Add a list view to your xml file:
<ListView android:id="+@id/myListView" android:layout_width="fill_parent" android:layout_height="wrap_content"> </ListView> And then reference it on the activity to make your logic:
Listview lv = (ListView) findviewById(R.id.myListView); lv...........