如何在 alertDialog 中包含自定义标题栏?我知道 android sdk 提供 setCustomTitle 方法,但它不起作用
编辑:
AlertDialog alert = new AlertDialog.Builder(this).setTitle("Test").setMessage("hello").show();
View view=alert.getLayoutInflater().inflate(R.layout.titlebar, null);
alert.setCustomTitle(view);
但上面的代码不起作用
注意:
我不是在寻找自定义对话框,而只是想自定义其标题布局。如下所示