Saturday, 26 August 2017

Create Alert Dialog box

    final AlertDialog.Builder alert = new AlertDialog.Builder(DeleteActivity.this);
        alert.setTitle("Conformize");
        alert.setMessage("Are you sure won't to  Delete");
        alert.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
            @Override            public void onClick(DialogInterface dialog, int which) {
                dialog.cancel();
            }
        });
        alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
            @Override            public void onClick(DialogInterface dialog, int which) {
                dialog.cancel();
            }
        });
        alert.show();
    }
});

No comments:

Post a Comment

HOW TO CREATE CIRCLE IMAGE VIEW

Step 1: implementation 'de.hdodenhof:circleimageview:3.0.0' Step 2: <de.hdodenhof.circleimageview.CircleImageView xmlns:ap...