Code example for DialogFragment

Methods: dismiss, getActivity, getArguments

0
				DateFormat.is24HourFormat(getActivity()));
	} 
 
	@Override 
	public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
		TimePickerDialogListener activity = (TimePickerDialogListener) getActivity();
		Bundle arguments = getArguments();
		Log.v("Hmmm...", arguments.getString("buttonId"));
		activity.onFinishDialog(arguments.getString("buttonId"), hourOfDay, minute);
		this.dismiss();
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java