public static TimePickerFragment NewInstance(Action <DateTime> onTimeSelected) { TimePickerFragment frag = new TimePickerFragment(); frag.timeSelectedHandler = onTimeSelected; return(frag); }
void TimeSelect_OnClick(object sender, EventArgs eventArgs) { TimePickerFragment frag = TimePickerFragment.NewInstance( delegate(DateTime time) { depTime.Text = "Departure Time: " + time.ToShortTimeString(); initialDepTime = time; }); frag.Show(FragmentManager, TimePickerFragment.TAG); }