user631854
user631854

Reputation:

how to use popup windows

I want to show a pop up windows which contains various item like shown below:-

Path:/mnt/sdcard/absar
Size:100mb
Type:File

How can I do it?

Upvotes: 0

Views: 436

Answers (2)

Siten
Siten

Reputation: 4533

so if u want statically generate popup msg than just use or call this method where u want to pop up.

private void displayDialog(string size,String type){
        AlertDialog.Builder builder = new AlertDialog.Builder(Classname);
        builder.setMessage("Path:"+"/mnt/sdcard/absa" + "\nsize:"+size+ "\ntype:"+type+  )
        .setCancelable(false)
        .setPositiveButton("ok", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {

            }
        })
        .setNegativeButton("cancel", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
                dialog.cancel();                        
            }
        });
        AlertDialog alert = builder.create();   
        alert.setTitle(sethed);
        alert.show();

Upvotes: 2

Ravishankar V
Ravishankar V

Reputation: 323

Do look at the documentation for toast

Upvotes: 0

Related Questions