I use DatePickerDialog in my application, and my problem is that when I try to change the "Day", a soft keyboard appears and shows the numbers, and the carriage in front of the number. When I click the numbers, it does not replace what is already in the "Day" field. Only if I go to the end of the number in the "Day" field and delete it (the return space on the soft keyboard), and then enter the number, it will work.
Why is this happening? Why doesn't he redefine what already exists?
This code displays a dialog box:
protected Dialog onCreateDialog(int id)
{
Dialog ReturnDialog = null;
switch (id)
{
case DATE_DIALOG_ID:
ReturnDialog = new DatePickerDialog(this, mDateSetListener, Year, Month - 1, Day );
break;
}
return ReturnDialog;
}
Then I call it from onClickListener ()
showDialog( DATE_DIALOG_ID );
What am I doing wrong?
source
share