If you are trying to create and display an AlertDialog, you should, for example, use AlertDialog.Builder.
DialogInterface, as the name implies, has an interface and has only two methods: cancel () and reject ().
Creating an AlertDialog is pretty simple:
new AlertDialog.Builder(this)
.setTitle("Some Title")
.setMessage("some message")
.setPositiveButton("OK", new OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
}
})
.setNegativeButton("cancel", new OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
}
})
.show();
This shows a simple AlertDialog.
: Activity.showDialog(int) Activity.onCreateDialog(), .