Deprecated: showDialog(int id)

public final void showDialog (int id) was added in API level 1
Deprecated in API level 13.
Use the new DialogFragment class with FragmentManager instead; this is also available on older platforms through the Android compatibility package.
Simple version of showDialog(int, Bundle) that does not take any arguments. Simply calls showDialog(int, Bundle) with null arguments.
The onCreateDialog() method is overridden and called when the showDialog() method is called with a parameter.

1. Create a constant named ALERT_DIALOG and set it to 0.

2. In the MainActivity.java file, add the below line to the onClickListener widget of your choice. The showDialog method calls the onCreateDialog method. The showDialog method uses an integer. The integer will be used in the onCreateDialog to select a Dialog to display. Below a constant integer ALERT_DIALOG is being used.

showDialog(ALERT_DIALOG); 

3. Compile and run!

Next Recommended Article: Deprecated: onCreateDialog

Resources:
http://developer.android.com/reference/android/app/Activity.html#showDialog(int)