MapView in Fragment ( Android 4.0 or higher)
问题 I've been looking for a while to find a good tutorial with code example for a MapView in Fragment for ICS. Anyone have any links? 回答1: Here is a book's sample application showing how to have a MapView in a Fragment in an API Level 11+ app. It's mostly just a MapActivity . Here are the key bits of the fragment that loads the MapView : public class MapFragment extends Fragment { private MapView map=null; private MyLocationOverlay me=null; @Override public View onCreateView(LayoutInflater