我想删除DatePickerDialog
中的额外背景这是我的代码
DatePickerDialog dpd = new DatePickerDialog(RegisterActivity.this, android.R.style.Theme_Holo_Dialog, date,
myCalendar.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
myCalendar.get(Calendar.DAY_OF_MONTH));
答案 0 :(得分:1)
您可以像这样覆盖对话框主题:
<style name="TransparentDatePickerDialogTheme" parent="AlertDialog.AppCompat">
<item name="android:windowBackground">@android:color/transparent</item>
</style>
然后应用这样的主题
DatePickerDialog dpd = new DatePickerDialog(RegisterActivity.this, R.style.TransparentDatePickerDialogTheme, date,
myCalendar.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
myCalendar.get(Calendar.DAY_OF_MONTH));