Creating a Dialog is quite easy in Android.
void showDialogToPurchase()
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Title");
builder.setMessage("Message")
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User clicks OK
}
})
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {builder.create().show();public void onClick(DialogInterface dialog, int id) {
// User cancels the dialog.
}
});
}