[MaterialDatePicker] Dynamic Theme at runtime
See original GitHub issueI have a MaterialDatePicker
and it correctly infers the colours from my theme. However, I’d like to customize the theming at runtime with dynamic values that I can’t put into XML files.
Would it be possible to theme MaterialDatePicker when creating it?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Android Material Date Picker and Material Time Picker in ...
If you want to dynamically set the time format, based on the respective system settings, you can determine it by the following code...
Read more >Runtime Change Android material theme - java - Stack Overflow
Dynamic themes using style.xml. Here is my code. Style.xml <resources> <style name="AppTheme.Base.Green" parent="AppTheme.
Read more >Dynamic Theme Colors at Runtime - Android Stuff
You can achieve dynamically colored themes with some libraries that will either use their own View implementations or some amount of workarounds ...
Read more >Change Color of Material TimePicker and DatePicker ... - Reddit
I know I can set the style but that means that I need to have the style predefined in my resources, but my...
Read more >Datepicker - Angular Material
It's also possible to set the locale at runtime using the setLocale method of the DateAdapter . ... YYYY/MM/DD. Dynamically switch to French ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it’s a fair request but not something easy to do on our end due to the complexity of MaterialDatePicker. I’m not sure how long it will take to make this happen…
In the meantime I’ll suggest you to find alternative solutions for this like the ResourceLoader API (introduced on API 30+) or the possibility to avoid tinting at runtime, which is not well supported on the Android View system.
I thank for your understanding and hope this helps. : )
Can you file a new issue? It might be easier to support customized colors at runtime for time pickers, due to it’s much simpler than date pickers…