Code example for Fragment

Methods: getActivity

0
	//*************************************** 
    // MythActivity methods 
    //*************************************** 
	public MainApplication getMainApplication() { 
		 
		if( null != getActivity() ) {
			return (MainApplication) getActivity().getApplicationContext();
		} else { 
			return null; 
		} 
	 
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE