Code example for SupportMapFragment

Methods: onCreate

0
 
    /** 
     */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    } 
 
    /** 
     */ 
    @Override 
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        if (hasMapOverlayView()) { 
            RelativeLayout layout = new RelativeLayout(inflater.getContext());
            layout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
 
            // Add view with maps. 
            layout.addView(super.onCreateView(inflater, container, savedInstanceState));
 
            // Add maps overlay view. 
            layout.addView(onCreateMapOverlayView(inflater, container, savedInstanceState));