Code example for DialogFragment

Methods: getTargetFragment, getTargetRequestCode

0
	 
	//private Date mDate; 
	 
	private void sendResult(int resultCode, int choice) {
		 
		if (getTargetFragment() == null) return;
		 
		Intent intent = new Intent();
		intent.putExtra(BUNDLE_EXTRA_CHOICE, choice);
		 
		getTargetFragment()
			.onActivityResult(getTargetRequestCode(), resultCode, intent);
		 
	} 
	 
//	public static ChangeChoiceFragment newInstance(Date date) { 
//		 
//		Bundle args = new Bundle(); 
//		args.putSerializable(BUNDLE_EXTRA_DATETIME, date); 
//