I am programming a simple game, and now, i want my Application to show a dialog box, when a Countdown finishes. I tryed that Code (see below), but it doesn't work:
protected void alertbox()
{
new AlertDialog.Builder(this)
.setMessage("You've scored " + score + " points!")
.setTitle("Congatulations!")
.setCancelable(false)
.setNeutralButton(android.R.string.cancel,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton){}
ButtonActivity.this.finish();
})
.show();
}