Advertisement
cloud101eu

Cloud101.eu: Calculator Alertwindow.java

Mar 10th, 2012
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. package com.cloud101.windows;
  2.  
  3. import android.app.Activity;
  4. import android.app.AlertDialog;
  5. import android.content.DialogInterface;
  6.  
  7. public class Alertwindow {
  8.    
  9.     public Alertwindow(Activity activity,String message){
  10.  
  11.     AlertDialog.Builder builder = new AlertDialog.Builder(activity);
  12.     builder.setMessage(message)
  13.            .setCancelable(false)
  14.            .setPositiveButton("Ok",  new DialogInterface.OnClickListener() {
  15.                public void onClick(DialogInterface dialog, int id) {
  16.                     dialog.dismiss();
  17.                }
  18.            });
  19.    
  20.     AlertDialog alert = builder.create();
  21.     alert.show();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement