Code example for MapView

Methods: onResume

0
    } 
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
        mMapView.onResume();
 
        setUpMapIfNeeded(); 
    } 
 
    private void setUpMapIfNeeded() { 
        if (mMap == null) {
            mMap = ((MapView) findViewById(R.id.map)).getMap();
            if (mMap != null) {
                setUpMap(); 
            } 
        } 
    } 
 
    private void setUpMap() { 
        mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title("Marker"));