How to Create a Delete Alert Dialog

This example will create an AlertDialog similar to the Alert Dialog that displays when a user deletes an app from their API Level 10 device
This was tested on a: Samsung YP-G0, API Level 10, Version 2.6.35



1. How to get to the AlertDialog we are reproducing:
a. Select the Applications icon on the bottom menu
b. Select the menu button.
c. Select Edit from the pop-up menu
d. Select the app you'd like to delete
e. An AlertDialog will display that looks like this.

2. To create the AlertDialog above, follow the steps below.

3. Set the Title in an AlertDialog to display with the message "Delete".

4. Add an Icon/Drawable to the AlertDialog with the default Android Dialog Alert icon:  drawable: android.R.drawable.ic_dialog_alert

5. Set a the Message in an AlertDialog to "This application will be deleted"

6. Set an AlertDialog.Builder Positive Button Listener with the display text of "OK"

7. Set an AlertDialog.Builder Negative Button Listener with the display text of Cancel.

8. Compile and run!