I've never used DatePickerDialog
but as far as I can tell, you're using 0, 0, 0
as the year, month of year and day of month parameters. Set these to be something logical like 2011, 9, 16
and see if that helps.
EDIT Actually you may have to use 10
for September as I think it conforms to the 0-11 month numbers used by Calendar
.
manpreet
Best Answer
2 years ago
I'm completely new to programming on the Android platform but I'm interested in learning more of it. At the moment I'm doing this with the aid of a step by step handbook. Just to get myself familiar with the programming environment. I have knowledge of the Java language although I would not go as far by saying I'm good at it.
As for the problem, what I'm creating is a simple trivia game for Android devices. On a settings screen I am using a DatePickerDialog for the users birthday. Only when I run it on my Android device (Samsung Galaxy S i9000) or an emulator it crashes when trying to popup the DatePickerDialog.
The code I use is:
Can anyone see if I'm doing something wrong here? When running I get an IllegalArgumentException in that method. I'm using Eclipse to program for Android, but I'm also fairly new to the program (I'm more familiar with Netbeans), I'm still trying to figure out how to properly debug through the Android app.
If anyone can help it will be greatly appreciated! Kind Regards, Floris
EDIT: As per request I added the LogCat lines: