Code example for DialogFragment

Methods: onCreate, setRetainInstance

0
	} 
	 
	public class DatePickerFragment extends DialogFragment{
		@Override 
		public void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			setRetainInstance(true);
		} 
		 
		public Dialog onCreateDialog(Bundle savedInstanceState) {
			return new DatePickerDialog(getActivity(), mDateSetListener, year, month-1, day);
		} 
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE