I have a list view. I want to add a map inside each list item. The map will show/hide when I click on the list item. When the map shows, I can zoom, view location detail... on it. But I can't set MapFragment in the adapter. So, give me some solutions. Thank you.
gMap = (MapFragment) getFragmentManager().findFragmentById(R.id.map);
googleMap = gMap.getMap();
I can't do that in getView.
I just went through a similar problem and I came up with the following solution. By the way, now play services has google map lite mode.
You can see the entire example at: https://github.com/vinirll/MapListView
Let's suppose you have a ListView using an BaseAdapter, so you should override your getView method. This is how my getView looks like:
Where class CustomItem is the FrameLayout that represents my row.