Code example for Fragment

Methods: getActivity

0
	public BaseFragment() { 
 
	} 
 
	public ActionBarFragmentActivity getActionBarActivity() { 
		final Activity activity = getActivity();
		if (activity instanceof ActionBarFragmentActivity) return (ActionBarFragmentActivity) activity;
		return null; 
	} 
 
	public TwidereApplication getApplication() { 
		final Activity activity = getActivity();
		if (activity != null) return (TwidereApplication) activity.getApplication();
		return null; 
	} 
 
	public ContentResolver getContentResolver() {
		final Activity activity = getActivity();
		if (activity != null) return activity.getContentResolver();
		return null; 
	}