其實我一直在使用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