android自定义AlertDialog

来源:互联网 发布:node 社区公开的api 编辑:程序博客网 时间:2024/05/22 03:49
View dialogView = LayoutInflater.from(context).inflate(R.layout.your_layout, null);AlertDialog dialog = new AlertDialog.Builder(context).create();dialog.show();//必须先show,然后再setContentView,不然会报异常:requestFeature() must be called before adding contentdialog.setContentView(dialogView);


0 0