unoplatform / Uno.Themes

This library is designed to help you use the Material, Fluent or Cupertino design system with the Uno Platform
https://platform.uno
Apache License 2.0
167 stars 30 forks source link

[Material][Android] Override the styles.xml with the `MaterialColors` color palette? #871

Open kazo0 opened 1 year ago

kazo0 commented 1 year ago

There are cases where the UI may not follow the color palette that is initialized with MaterialColors. For example, launching a native DatePicker on Android will display the DatePicker with whatever default colors are set within the styles.xml.

If we had defined our Material color palette for Uno.Material with these colors: image

We would still see this for the default native DatePicker: image

But, we want the native styles to also adapt to whatever color palette was given to Uno.Material

This can be accomplished by overriding the default color values within the Android head's styles.xml image

Xiaoy312 commented 1 year ago

this is actually a known problem since the initial version we used to have workaround documented in the readme for this back then: https://github.com/unoplatform/Uno.Themes/tree/1.3.0#datepickers-and-timepickers somehow that info was lost between v1~2


that said, we might want to look into how to inject that dynamically at runtime if possible

GitHub
GitHub - unoplatform/Uno.Themes at 1.3.0
This library is designed to help you use the material design system with the Uno Platform - GitHub - unoplatform/Uno.Themes at 1.3.0