In this chapter, we already covered how to use the fragment and
ListFragment to optimize layout for Android tablets. Let's now discuss another specialized fragment subclass,
DialogFragment. The current implementation of the
AlertDialog to display the confirmation dialog to a user before deleting the POI. In this section, we will replace the
AlertDialog implementation with
DialogFragment is used to display a fragment as a floating dialog window that pops up on top of the current window.
DialogFragment is the subclass of fragment and was introduced in Android 3.0 API level 11. Google recommends that you use
DialogFragment for implementing the dialog because of the following reasons: