如何删除 DatePickerDialog 后面不必要的视图?

How to remove unneccesary View behind DatePickerDialog?

我从 here. There in that example you can see he is running with a dialog style like this old style for DatePickerDialog without border

实现了这个例子

当我使用它时,我可以清楚地看到该对话框后面的附加视图:date picker dialog with border

如何删除我的日期选择器对话框后面的附加视图?

尝试:

dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));