其实我一直在使用AlertDialog.builder.In此对话框我没有显示titile.All工作正常,但有一个黑色边框出现在dialog.so任何人都可以创建一个自定义对话框中删除黑色边框告诉我如何删除这个黑色boder。代码和屏幕截图如下。如何从AlertDialog建设者
代码Java中:
AlertDialog.Builder start_dialog = new AlertDialog.Builder(this);
Context mContext = getApplicationContext();
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.custom_dialog2,
(ViewGroup) findViewById(R.id.layout_root));
layout.setBackgroundResource(R.drawable.img_layover_welcome_bg);
Button btnPositiveError = (Button)layout.findViewById(R.id.btn_error_positive);
btnPositiveError.setTypeface(m_facedesc);
start_dialog.setView(layout);
final AlertDialog alert = start_dialog.create();
alert.show();
btnPositiveError.setOnClickListener(new Button.OnClickListener()
{
public void onClick(View v)
{
alert.dismiss();
}
});
ScrrenShot
我已删除的背景这样做:http://stackoverflow.com/questions/8051581 /如何去除的边界 - 从-对话框。这些问题很可能我合并 – quinestor