开发者

android timepicker on cancel

I use standart android's timepicker:

...
showDialog(TIMEPICKER);
...
private TimePickerDialog.OnTimeSetListener mTimeSetListener =
        new TimePickerDialog.OnTimeSetListener() {
        public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
            //code;     
        }
    };


    @Override
    protected Dialog onCreateDialog(int id) {
    switch (id) {
    case TIMEPICKER:
    return new TimePickerDialog(this,mTimeSetListener, 0, 0, true);
    }
    return null;
    }

everything is fine,开发者_C百科 but how can i catch cancel button to perform some code ?


setOnCancelListener or try even the setOnDismissListener.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜