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?
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
精彩评论