我有两个主题 Theme.MaterialComponents.Light.DarkActionBar
和 Theme.MaterialComponents
。对于第一个主题,我的日期选择器对话框看起来和预期的一样,但对于深色主题,它显示白色背景。有什么想法可以让它看起来像预期的那样吗??
- My datepicker in Theme.MaterialComponents.Light.DarkActionBar
- Date picker in Theme.MaterialComponents
预期:我想在第二张图片中使用深色背景
最佳答案
正如此答案中的建议 Material Components theme dialog buttons go puffy after changing theme of Application
我在深色主题中使用 Theme.MaterialComponents.Bridge 而不是 Theme.MaterialComponents 作为父元素。
关于android - DatePickerDialog 和 Theme.MaterialComponents,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57054446/