安卓—自定义alert弹出窗口

 默认用法

public void alertDialog(View view) {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("弹出窗");
        builder.setMessage("提示信息!");
        builder.setPositiveButton("确认", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                System.out.println("确认执行函数");
            }
        }).setNegativeButton("取消", null);
        builder.show();
    }

猜你喜欢

转载自www.cnblogs.com/zhouxuezheng/p/11814040.html