I am using the same method for my time picker as I am for my date picker. My date is working perfecty fine, but the time dialog keeps showing me an error. I have looked into similar issues, but nobody has been in a relatable situation.
This is the code for the time picker dialog:
timePickerDialog = new TimePickerDialog(AddReminderActivity.this,
new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
Calendar calendar = Calendar.getInstance();
calendar.set(hourOfDay, minute);
SimpleDateFormat format = new SimpleDateFormat("hh:mm a");
String timeString = format.format(calendar.getTime());
r_time.setText((timeString));
}
}, mHour, mMinute);
timePickerDialog.show();
Here is also the error I keep getting:
Cannot resolve constructor 'TimePickerDialog(json.google_services.newreminderapp.AddReminderActivity, anonymous android.app.TimePickerDialog.OnTimeSetListener, int, int)'
Thank you.