public static TimePickerFragment NewInstance(Action <DateTime> onTimeSelected) { TimePickerFragment frag = new TimePickerFragment(); frag.timeSelectedHandler = onTimeSelected; return(frag); }
private void TimeClickEvent() { var frag = TimePickerFragment.NewInstance(delegate(DateTime time) { timeDisplay.Text = time.ToLongTimeString(); myEvent.Time = time; }); frag.Show(FragmentManager, TimePickerFragment.TAG); }