dialog layout xml:
I had the same problem, I managed to fix it using a custom dialog like this:
public class CustomDialog extends Dialog {
public CustomDialog(Context context, View view) {
super(context);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(view);
getWindow().getDecorView().setBackgroundResource(android.R.color.transparent);
}
}
Another option is to remove android:background="@android:color/white"
from your layout. Then the alert dialog will have its default light grayish background uniformly. (Since you have forced an inverse on a dark theme) At least it would look nice and worth the hassle. Just my two cents.
Hey setting your view to builder creates this gray lines on top-bottom,instead you can setView to your dialog.like dialog.setView(layout,0,0,0,0);It will bound your layout to whole dialog.