Q:

Why OnDateChangeListener callback is not being called on my DatePicker?

The code:
    final Time today = new Time();
    today.setToNow();
    OnDateChangedListener dateChangeListener = new OnDateChangedListener() {

        public void onDateChanged(DatePicker view, int year, int monthOfYear,
                int dayOfMonth) {

            android.util.Log.i(TAG, "entered onDateChanged"); //TODO: 

        }
    };
    datePickerDataInicio.init(today.year, today.month, today.monthDay, dateChangeListener);

So, whenever I change the spinners from the day, month, or year, it seems not to be calling.  What I missed?
Thanks!
EDIT!
Sorry guys, it was flaw of attention. I was just calling DatePicker.init() from another point of the code with null listener. Thanks.

A:

Try This code it is working..   
// Creating dialog
        @Override
        protected Dialog onCreateDialog(int id) {
         c = Calendar.getInstance();
        int cyear = c.get(Calendar.YEAR);
        int cmonth = c.get(Calendar.MONTH);
        int cday = c.get(Calendar.DAY_OF_MONTH);
        return new DatePickerDialog(this,  mDateSetListener,  cyear, cmonth, cday);
        }

    private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() {
    // onDateSet method
    public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
        Log.e("----------------", "D.O.B  "+monthOfYear+""+dayOfMonth+""+year);
        date_selected = String.valueOf(monthOfYear+1)+" /"+String.valueOf(dayOfMonth)+" /"+String.valueOf(year);
    }
    };

call this method onClick of any button or text where  
DATE_DIALOG_ID=1;  
showDialog(DATE_DIALOG_ID);

