需要从对话框片段中消除顶部和底部边框。你怎么做呢?
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setCancelable(true);
LayoutInflater inflater = LayoutInflater.from(activity);
View view = inflater.inflate(R.layout.variants_dialog, null);
// setup views
setupListView(view);
...
builder.setView(view);
return builder.create(); // HERE I HAVE TOP & BOTTOM BLACK BORDERS
这无济于事:
builder.setView(view);
AlertDialog result = builder.create();
result.getWindow().setBackgroundDrawable(new ColorDrawable());
return result;
没有这样的方法:
dialog.setView(layout, 0, 0, 0, 0);