我收到以下错误:
Cannot resolve method 'newInstance(com.example.ghazalitodo.AddReminderActivity, int, int, boolean)
这是我的代码:
public void setTime(View v) {
if (mCurrentReminderUri == null) {
Toast.makeText(this, "click again on the reminder list to set time alarm", Toast.LENGTH_LONG).show();
return;
}
Calendar now = Calendar.getInstance();
TimePickerDialog tpd = TimePickerDialog.newInstance(this, now.get(Calendar.HOUR_OF_DAY),
now.get(Calendar.MINUTE), false);
tpd.setThemeDark(false);
tpd.show(getFragmentManager(), "Timepickerdialog");
}
// On clicking Date picker
public void setDate(View v) {
if (mCurrentReminderUri == null) {
Toast.makeText(this, "click again on the reminder list to set date alarm", Toast.LENGTH_LONG).show();
return;
}
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.new Instance(this, now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
慕码人8056858
相关分类