常用控件

简单的

难点的
AlertDialog.Builder dialog=new AlertDialog.Builder(TestActivity.this);
                dialog.setTitle("This is Dialog");
                dialog.setMessage("Somnus");
                dialog.setCancelable(false);//可否取消
                dialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                    }
                });
                dialog.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                    }
                });
                dialog.show();
 
ProgressDialog progresDialog=new ProgressDialog(TestActivity.this);
                progresDialog.setTitle("sdf");
                progresDialog.setMessage("Lading.....");
                progresDialog.setCancelable(true);
                progresDialog.show();

你可能感兴趣的:(常用控件)