public static TimePickerFragment NewInstance(Action <DateTime> onTimeSelected) { TimePickerFragment frag = new TimePickerFragment(); frag.timeSelectedHandler = onTimeSelected; return(frag); }
void TimeSelectOnClick(object sender, EventArgs eventArgs) { TimePickerFragment frag = TimePickerFragment.NewInstance( delegate(DateTime time) { timeDisplay.Text = time.ToShortTimeString(); timeToWater = time; }); frag.Show(FragmentManager, TimePickerFragment.TAG); }