DialogFragment advantages over AlertDialog [duplicate]
This question already has an answer here: Android DialogFragment vs Dialog 7 answers When developing an Android app, I've read that it's recommended to use DialogFragment instead of using directly an AlertDialog to show alerts and confirmations. This is done, for example, on DialogFragment's Documentation: http://developer.android.com/reference/android/app/DialogFragment.html People also say they prefer this here: Android DialogFragment vs Dialog I would like to know the advantages of this approach, since the code becomes more complex. Thanks Tobrun Use DialogFragment over Dialog: Since the