【问题标题】:DatePickerDialog and Theme.MaterialComponentsDatePickerDialog 和 Theme.MaterialComponents
【发布时间】:2019-07-16 09:46:09
【问题描述】:

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

  1. My datepicker in Theme.MaterialComponents.Light.DarkActionBar
  2. Date picker in Theme.MaterialComponents

预期:我想在第二张图片中使用深色背景

【问题讨论】:

  • 三个问题:1.你是用构造函数参数(DatePickerDialog(context, R.style.Theme_MaterialComponents)来定义这个主题的选择吗? 2.你用的是哪个版本的material和appcompat库? 3.活动主题中的colorPrimarycolorSecondarycolorSurface等是什么?
  • 1) 没有发送任何参数。

标签: android themes material-design datepickerdialog


【解决方案1】:

正如这个答案中所建议的Material Components theme dialog buttons go puffy after changing theme of Application

我在深色主题中使用 Theme.MaterialComponents.Bridge 而不是 Theme.MaterialComponents 作为父级。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-15
    • 1970-01-01
    相关资源
    最近更新 更多