Advertisement
dzikovskyy

Show info dialog

Jul 5th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. public static void showInfoDialog(Context context, String text) {
  2.  
  3.         AlertDialog.Builder builder = new AlertDialog.Builder(context);
  4.         builder.setMessage(text)
  5.                 .setPositiveButton("OK", new DialogInterface.OnClickListener() {
  6.                     public void onClick(DialogInterface dialog, int id) {
  7.                         dialog.dismiss();
  8.                     }
  9.                 });
  10.         Dialog dialog = builder.create();
  11.         dialog.show();
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement