July 2015
Beginner to intermediate
600 pages
18h 59m
English
Now that you have the Maps API set up, you need to create a map. Maps are displayed, appropriately enough, in a MapView. MapView is like other views, mostly, except in one way: for it to work correctly, you have to forward all of your lifecycle events, like this:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mMapView.onCreate(savedInstanceState);
}
This is a huge pain in the neck. It is far easier to let the SDK do that work for you instead by using a MapFragment or, if you are using support library fragments, SupportMapFragment. The MapFragment will create and host a MapView for you, including the proper lifecycle callback hookups.
Your first step is to wipe ...
Read now
Unlock full access