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.typeDayOfWeek));
		builder.setPositiveButton(android.R.string.ok, this);
		builder.setNegativeButton(android.R.string.cancel, this);
 
		View view = LayoutInflater.from(this.getActivity()).inflate(
				R.layout.rule_day_of_week, null, false); 
 
		ListView listView = (ListView) view.findViewById(android.R.id.list);