Skip to content Skip to sidebar Skip to footer

Android How To Get An Date Picker & Time Picker Throgh Image Button Click

Main thing is to set listadapter for ListActivity I used differnent adapter class(TaskAdapter.java) where I override the getview() and in there i write the code foe checkbox, text

Solution 1:

You have an IllegalArgumentException in the DatePicker's day (read the 2nd and fourth red lines to know how I know that). The 9th red line tells me that the problem is in your HomeActivity.java file, in the line 363, which is part of the onCreateDialog method. In this case, it is clearly the DatePickerDialog constructor.

As dziobas said, it is possible that you have a base zero day, and that could be the problem. mDay could be set to a number higher that the allowed for that month also. You may want to initialize private mDay = 1 instead of leaving it as is.

Solution 2:

Solution 3:

and also by default the month value in the DatePickerDialog will always start from 0 so you print the value of the Month and if you get 0 you add +1

Post a Comment for "Android How To Get An Date Picker & Time Picker Throgh Image Button Click"