Code example for DialogFragment

Methods: onDetach

0
		} 
	} 
 
	@Override 
	public void onDetach() { 
		super.onDetach(); 
		this.listener = null;
	} 
 
	@Override 
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		AlertDialog.Builder builder = new AlertDialog.Builder(
				this.getActivity());
		builder.setTitle(this.getString(R.string.typeDate));
		builder.setPositiveButton(android.R.string.ok, this);
		builder.setNegativeButton(android.R.string.cancel, this);
 
		View view = LayoutInflater.from(this.getActivity()).inflate(
				R.layout.rule_date, null, false); 
 
		Bundle bundle = this.getArguments();