开发者

how to use popup windows

开发者 https://www.devze.com 2023-02-14 01:45 出处:网络
开发者_JAVA百科I want to show a pop up windows which contains various item like shown below:- Path:/mnt/sdcard/absar
开发者_JAVA百科

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?


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();


Do look at the documentation for toast

0

精彩评论

暂无评论...
验证码 换一张
取 消