There are times when you need to display a dialog window to get a confirmation from the user. In this case , you can override the onCreateDialog() protected method defined in the Activity base class to display a dialog window. The following Try It Out shows you how. 1. Using Android Studio , create a new Android project and name it Dialog. When presented with the option , name the main activity DialogActivity. 2.Add the following theme in bold to the AndroidMainfest.xml file. Be sure to change all instances of "com.android" to whatever package name your project is using. <?xml version="1.0" encoding="utd-8"?> <manifest xmlns:android"http://schemas.android.com/apk/res/android" package="com.android.dialog"> <application android:allowBackup="true" android:icon:="@mipmap/ic_launcher" ...