I understand that there is this documentation
http://developer.android.com/reference/android/app/DialogFragment.html#AlertDialog
but as a new Android/Java le
You can show the dialog like this:
new AlertDialog.Builder(this)
.setMessage("Are you sure you want to reset the count?")
.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
Toast.makeText(MainActivity.this, "Did not reset!", 5).show();
}
})
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
Toast.makeText(MainActivity.this, "Did Reset!", 5).show();
}
})
.create().show();