Alert dialogs are a standard utility in Android. Templates implementing fragments-based dialogs are archived in the project DialogTemplate, to make it easy to implement various dialogs in other projects. Instructions for installing it in Android Studio may be found in Packages for All Projects.
For examples of usage, see the Dialogs, Alerts, & Notifications project.
Last modified: June 10, 2016