flavienlaurent / datetimepicker

DateTimePicker is a library which contains the beautiful DatePicker that can be seen in the new Google Agenda app.
1.83k stars 578 forks source link

Resource Not Found Exception with onDateSet method #132

Open Cyux07 opened 7 years ago

Cyux07 commented 7 years ago
android.content.res.Resources$NotFoundException: String resource ID #0x5
                                                                                      at android.content.res.Resources.getText(Resources.java:1178)
                                                                                      at android.widget.TextView.setText(TextView.java:5157)
                                                                                      at com.cqut.cfc.matsui.flowerbirdspot.minor.ProfileActivity.onDateSet(ProfileActivity.java:276)
                                                                                      at com.fourmob.datetimepicker.date.DatePickerDialog.onDoneButtonClick(DatePickerDialog.java:323)
                                                                                      at com.fourmob.datetimepicker.date.DatePickerDialog.onDayOfMonthSelected(DatePickerDialog.java:336)
                                                                                      at com.fourmob.datetimepicker.date.SimpleMonthAdapter.onDayTapped(SimpleMonthAdapter.java:95)
                                                                                      at com.fourmob.datetimepicker.date.SimpleMonthAdapter.onDayClick(SimpleMonthAdapter.java:89)
                                                                                      at com.fourmob.datetimepicker.date.SimpleMonthView.onDayClick(SimpleMonthView.java:157)
                                                                                      at com.fourmob.datetimepicker.date.SimpleMonthView.onTouchEvent(SimpleMonthView.java:265)
                                                                                      at android.view.View.dispatchTouchEvent(View.java:10731)

when I invoke a textview in the override method onDateSet, this Exception occured. i can use the view in other place.(it's bind by butterknife)

@Override
    public void onDateSet(DatePickerDialog datePickerDialog, int year, int month, int day) {
        Date birthday = new Date(year, month, day);
        birthdayTextView.setText(birthday.getDate());
    }