Dialog box is used to allow user to confirm some thing or used to enter some information. In this post i explain you how to create alert dialog and progress dialog in android.

Alert Box in Android

media-20140921 (2)
1. Create new android project.

2. Open your layout file inside layout folder (eg. mainactivity.xm).

3. Create a button in layout

 4. Now open your java file MainActiviy.java . In this file we use AlertDialog.Builder to create the alert box interface, like title, message to display, buttons, and button onclick function. First create a variable for button and after find button on layout and when user click we create alert box. In this you also add more button to add button follow this link 

Progress Dialog or Progress Bar Dialog Android

Progress dialog is used in android to show the progress of uploading and downloading of file. Progress bar is very easy to create. Please follow above step 1, 2, 3. Get button and start loading something i create a simple example so i am not loading anything but show you how to load. You need ProgressDialog to create this. You also read more about ProgressDialog from this link

Complete Code