android - DatePickerDialog 和 Theme.MaterialComponents

标签 android themes material-design datepickerdialog

我有两个主题 Theme.MaterialComponents.Light.DarkActionBarTheme.MaterialComponents。对于第一个主题,我的日期选择器对话框看起来和预期的一样,但对于深色主题,它显示白色背景。有什么想法可以让它看起来像预期的那样吗??

  1. My datepicker in Theme.MaterialComponents.Light.DarkActionBar
  2. 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/

相关文章:

templates - Drupal 用户配置文件页面中的自定义菜单选项卡

android - 将自定义灯光主题应用于 android timePicker

android - 扩展时更改 ModalDrawer 的大小,Jetpack Compose

android - 如何使 fragment 从顶部工具栏显示到底部

java - Android 低功耗蓝牙

java - 当预览打开时,Android SurfaceView 叠加在相机 View 上不显示

android - Android播放声音无延迟

android - 实现 Day View/Schedule Android UI 的最佳方式

ssh - Windows 终端主题颜色 SSH

c# - 使用 Material Design 在 WPF 中使用二次强调色