question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[MaterialDatePicker] Dynamic Theme at runtime

See original GitHub issue

I 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:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
drchencommented, Mar 2, 2022

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. : )

0reactions
drchencommented, Apr 8, 2022

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…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found