Code example for Fragment

Methods: getActivity

0
	//*************************************** 
    // MythActivity methods 
    //*************************************** 
	public MainApplication getMainApplication() { 
		 
		if( null != getActivity() ) {
			return (MainApplication) getActivity().getApplicationContext();
		} else { 
			return null; 
		} 
	 
	} 
 
} 
Experience pair programming with AI  Get Codota for Java