I have an activity - TimePickerActivity - which creates a TimePickerDialog. I have a onTimeSetListener which responds to the Set button at the end of which it calls finish(
I've just override (kotlin sample code)
override fun onCancel(dialog: DialogInterface?) {
super.onCancel(dialog)
callback?.onCancelClick()
}
method inside my DialogFragment and called onCancelClick of my interface:
interface SetAlarmTimeListener: TimePickerDialog.OnTimeSetListener {
fun onCancelClick()
}