Im trying to use the .show() method for my AndroidStudio but .show() is showing up in red. I tried looking up to see if I was missing any dependencies but it seems correct, at least from my perspective. Im trying to learn Android Studio. I will attach the code below. Any assistance would be great!
private void saveToDo(){
String description = editTextDescription.getText().toString();
//the following to get the date chosen in datepicker abd store it in a Date type attribute
int year = datePickerDueDate.getYear();
int month = datePickerDueDate.getMonth();
int day = datePickerDueDate.getDayOfMonth();
Calendar calendar = Calendar.getInstance();
calendar.set(year, month, day);
Date dueDate=calendar.getTime();
if(description.trim().isEmpty()){
Toast.makeText(this, "Please enter a description!", Toast.LENGTH_SHORT.show()); //Show method not working
}
Intent data = new Intent();
data.putExtra(EXTRA_DESCRIPTION, description);
data.putExtra(EXTRA_DUEDATE, dueDate);
setResult(RESULT_OK,data);
finish();```