Code example for DialogFragment

Methods: setArguments

0
	 
	public static AlertFragment create(int type) {
		AlertFragment fragment = new AlertFragment();
		Bundle args = new Bundle();
		args.putInt("type", type);
		fragment.setArguments(args);
		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