Code example for SupportMapFragment

Methods: getActivity, onActivityCreated

0
    public SherlockFragmentActivity getSherlockActivity() { 
        return mActivity;
    } 
     
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        AnalyticsUtils.setContext(getActivity()); 
    } 
 
    @Override 
    public void onAttach(Activity activity) {
        if (!(activity instanceof SherlockFragmentActivity)) {
            throw new IllegalStateException(getClass().getSimpleName()
                    + " must be attached to a SherlockFragmentActivity."); 
        } 
        mActivity = (SherlockFragmentActivity) activity;
 
        super.onAttach(activity);
    }