Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] DatePicker theming issues with Android dark mode #9033

@streviranus

Description

@streviranus

Description

When using an Android device that supports dark mode (i.e. Android 10) and styles inheriting from Theme.AppCompat.DayNight, the DatePicker dialog box has a white background instead of dark gray when the device is in dark mode, resulting in unreadable text.

Related to: (#8029)

Steps to Reproduce

  1. Define a theme in your Android project that inherits from Theme.AppCompat.DayNight
  2. Make a datepicker theme that inherits from Theme.AppCompat.DayNight.Dialog
  3. Add the datepicker dialog style to the application theme like so:
    @style/AppCompatDialogStyle
  4. Set the theme of your MainActivity to the application theme defined above.
  5. Run the app on a device in dark mode and click on a DatePicker

Expected Behavior

The DatePicker is styled according to the theme, with white text on a dark background.

Actual Behavior

The DatePicker style is only partially applied, resulting in white text on a white background.

Basic Information

  • Version with issue: 4.4.0
  • Last known good version: Unknown
  • IDE: Visual Studio Professional 2019, version 16.4.2
  • Platform Target Frameworks:
    • Android: 10.0
  • Android Support Library Version: 28.0.0.3
  • Affected Devices: Pixel 2 with Android 10.0

Screenshots

Screenshot_20191227-151204
Screenshot_20191227-151031

Reproduction Link

DisplayAlertTheming 2.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions