Code example for SupportMapFragment

Methods: onAttach

0
	        if (!(activity instanceof SherlockFragmentActivity)) {
	            throw new IllegalStateException(getClass().getSimpleName()+ " must be attached to a SherlockFragmentActivity.");
	        } 
	        mActivity = (SherlockFragmentActivity) activity;
 
	        super.onAttach(activity);
	    } 
 
	    @Override 
	    public void onDetach() { 
	        mActivity = null;
	        super.onDetach(); 
	    } 
 
	    @Override 
	    public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
	        onCreateOptionsMenu(new MenuWrapper(menu), mActivity.getSupportMenuInflater());
	    } 
 
	    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
	        // Nothing to see here.