Code example for AndroidRuntimeException

0
 
	@Override 
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		if (!(getActivity() instanceof AkuzActivity)) { 
			throw new AndroidRuntimeException("The activity MUST inherit from " + AkuzActivity.class.getCanonicalName());
		} 
	} 
 
	/** 
	 * This method is final here because we should use buildUi. 
	 */ 
	@Override 
	public final View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		this.inflater = inflater;
		buildUi(); 
		return root;
	} 
 
	/** 
Contextual code suggestions in your IDE  Get Codota for Java