Code example for DatePickerDialog

Methods: setOnDismissListener

0
    public Calendar getDate() {
        return mDate;
    } 
     
    private DatePickerDialog constructDialog() {
        DatePickerDialog dialog = new DatePickerDialog(getContext(), this,
                mDate.get(Calendar.YEAR), mDate.get(Calendar.MONTH),
                mDate.get(Calendar.DAY_OF_MONTH));
         
        dialog.setOnDismissListener(this);
         
        return dialog;
    } 
 
    @Override 
    public void onClick(View v) {
        // So!  At this point, bring up the DatePickerDialog.  We'll need 
        // to listen for its completion, too, so that's ANOTHER callback... 
        mLastDialog = constructDialog();
         
        mDialogShown = true;