Added an alter dialog for when users go to save their meals, informing them that the action would overrite the current meal plan they have saved.
Expected vs. Actual Behavior:
A warning message popup upon button click and a button to dismiss it.
Code Snippets:
saveMealButton.setOnClickListener {
val context: Context = saveMealButton.context
val builder = android.app.AlertDialog.Builder(context)
builder.setTitle("Warning!")
builder.setMessage("This action will override any previously saved meals for this current plan.")
builder.setPositiveButton("OK",null)
for (meal in meals) {
dbHelper.insertMeal(meal)
println("Meals Saved!")
}
}
UI - Warning Message for Saving Meal
Description:
Added an alter dialog for when users go to save their meals, informing them that the action would overrite the current meal plan they have saved.
Expected vs. Actual Behavior:
A warning message popup upon button click and a button to dismiss it.
Code Snippets:
Environment Details:
Android Studio, Windows OS.
Current Status:
Finished