public static TimePickerFragment CreateInstance(Action <DateTime> onTimeSelected) { var fragment = new TimePickerFragment(); fragment.timeSelectedHandler = onTimeSelected; return(fragment); }
private void TimeSelectedOnClick(object sender, EventArgs eventArgs) { var timePickerFragment = TimePickerFragment.CreateInstance( delegate(DateTime time) { this.displayTimeText.Text = time.ToShortTimeString(); }); timePickerFragment.Show(base.FragmentManager, TimePickerFragment.Tag); }