您好,感谢您的帮助。
我正在使用以下代码在我的 MapView Overlay 上生成通用 AlertDialog(一切正常)....我想知道如何或更改什么来调用名为 custom.xml 的自定义 AlertDialog
@Override
protected boolean onTap(int i)
{
//final Dialog dialoggg = new Dialog(mContext);
// dialoggg.setContentView(R.layout.custom);
// LayoutInflater inflater = LayoutInflater.from(mContext);
// View dialogview = inflater.inflate(R.layout.custom, null);
//when you tap on the marker this will show the informations provided by you when you create in the
//main class the OverlayItem
OverlayItem item = mOverlays.get(i);
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setMessage(item.getSnippet())
.setTitle(item.getTitle())
.setCancelable(true)
.setPositiveButton("View Details", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
Intent intent = new Intent(new Intent("com.GoGoGo.Play.LINEUP"));
mContext.startActivity(intent);
}
})
.setNegativeButton("Close window", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
AlertDialog alert = builder.create();
alert.show();
return true;
}
没什么太花哨的,我只想将 AlertDialog 的背景颜色更改为黑色......(从标准灰色)。
非常感谢您的时间和帮助。-谢谢