Code example for DialogFragment

Methods: getActivity, getArguments

0
		return fragment;
	} 
	 
	@Override 
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		LayoutInflater inflater = getActivity().getLayoutInflater();
		int type = getArguments().getInt("type");
		 
		if (type == ABOUT)
			return about(inflater);
		else if (type == CHANGELOG)
			return changelog(inflater);
		else if (type == FIRST)
			return firstTime(inflater);
		else 
			return null; 
	} 
	 
	public Dialog firstTime(LayoutInflater inflater) {
		View firstView = inflater.inflate(R.layout.first_time, null);