How To create an Alert dialog in android
We can create a simple alert dialog in android by using the below code.
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this)
.setMessage("Please Enter Email and Password").setTitle("Alert");
dialogBuilder.setPositiveButton("OK",
new android.content.DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
return;
}
});
dialogBuilder.create().show();
We can create a simple alert dialog in android by using the below code.
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this)
.setMessage("Please Enter Email and Password").setTitle("Alert");
dialogBuilder.setPositiveButton("OK",
new android.content.DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
return;
}
});
dialogBuilder.create().show();
No comments:
Post a Comment