Android DialogFragment vs Dialog
Google recommends that we use DialogFragment instead of a simple Dialog by using Fragments API , but it is absurd to use an isolated DialogFragment for a simple Yes-No confirmation message box. What is the best practice in this case? PJL Yes, use DialogFragment and in onCreateDialog you can simply use an AlertDialog builder anyway to create a simple AlertDialog with Yes/No confirmation buttons. Not very much code at all. With regards handling events in your fragment there would be various ways of doing it but I simply define a message Handler in my Fragment , pass it into the DialogFragment