Hi team,
Back in January 2022, I asked this question regarding dynamic theme support in SendBirdUIKit.ThemeMode.
At that time, I was told:
“Unfortunately, our UIKit follows Android themes. So, it is impossible to change the theme mode dynamically.”
Current Context:
- I have now upgraded to
com.sendbird.sdk:uikit:3.23.2 - My app uses dynamic theming (color codes are fetched from the server at runtime).
- I’m not relying on system-level
dark/lightmode, but rather applying custom hex color codes programmatically based on user or event data. - I already manage my own theming via
Theme.getInstance(context, eventKey)which provides custom color palettes.
My Question:
With UIKit v3.23.2, is it now possible to dynamically set or update SendbirdUIKit.ThemeMode at runtime?
- Can we programmatically apply or override style sets or
ThemeModeafter initialization? - Is there a way to reinitialize or refresh UIKit with a new theme without restarting the whole app or activity?
- Or do we still need to predefine
lightanddarkthemes statically instyles.xmland use onlyThemeMode.Light/ThemeMode.Dark/ThemeMode.System?
What I’m trying to achieve:
- Apply custom
toolbar background,header icons,input bar,send buttoncolors dynamically for different events/users without restarting the activity or app.
Would appreciate clarification on what’s now supported in UIKit 3.23.2 and whether dynamic runtime styling is now feasible or if it’s still a limitation.