3

I have two themes Theme.MaterialComponents.Light.DarkActionBar, and Theme.MaterialComponents. My date picker dialog is looking as expected for the first theme but for the dark theme, it shows a white background. Any ideas to make it look as expected??

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

Expected : I want a dark background in the second image

Community
  • 1
  • 1
SSS
  • 33
  • 5
  • Three questions: 1. are you using the constructor parameter (`DatePickerDialog(context, R.style.Theme_MaterialComponents`) to define this choice of theme? 2. which version of the material and appcompat libraries are you using? 3. what are `colorPrimary`, `colorSecondary`, `colorSurface` etc in the activity theme? – Cliabhach Nov 27 '19 at 17:47
  • 1) Am not sending any parameters. – SSS Feb 02 '20 at 13:56

1 Answers1

0

As suggested in this answer Material Components theme dialog buttons go puffy after changing theme of Application

I used Theme.MaterialComponents.Bridge instead of Theme.MaterialComponents as parent in my dark theme.

SSS
  • 33
  • 5