How can I reuse an AlertDialog for Yes/No on Android?
问题 I'm trying to find the way to reuse a Dialog that shows customized titles, then send the Yes/No click to the function that has launched the Dialog. I have two buttoms, Save and Dismiss, and both call a Yes/No Dialog, one showing "Do you want to save" and the other "Dismiss changes?". I think my procedure is very "dirty" but I guess it can work, but my problem is the "View view" variable, I don't know how to pass it from the Activity to the Dialog, so I can use it to recall the function that