AlertDialog.Builder was added in API Level 1
1. Declare an AlertDialog.Builder object.
2. After you declare the AlertDialog.Builder object, add this line below to instantiate it.
myAlertDialogBuilder = new AlertDialog.Builder(this);
3. Compile and run!
Next Recommended Article: How to Set a the Message in an AlertDialog.Builder
Resources:
http://developer.android.com/reference/android/app/AlertDialog.Builder.html
Popular Posts
- Solution: error: Error parsing XML: unbound prefix
- Change the line spacing between lines of text in an TextView/EditText, using lineSpacingExtra
- android:requiresFadingEdge
- Intent setType(String type) - How to Set an Explicit MIME data type
- android:maxWidth - Set the Maximum Width of TextView
- How to Add a Toast
- android:ellipsize - Add an ellipsis(...) in a TextView
- How to Declare a RatingBar
- android:background - Change the Background Color of an EditText
- String.valueOf - How to Convert a Double to a String