Hey Android Community, Can we update Android Theme...
# android
r
Hey Android Community, Can we update Android Theme at runtime. My requirement is to update the primary colour throughout the app . The colour hex would be fetched from server. My solutions : 1. Create wrapper classes around Widgets ( TextViews, RadioButtons etc) and pass Shared Pref to it. Then update the primary colours. 2. Use any 3rd Party dependency, if any . Was looking at Airbnb/Paris for the same.
stackoverflow 1
google 1
z
This is not kotlin related
r
Right, this is not kotlin related. But I was hoping if I could hear directly from experts about their opinion.
s
I dont think this is possible with traditional Android development, but I believe it is within Jetpack Compose.
It may be possible to switch between existing hard-coded themes using setTheme: https://developer.android.com/reference/android/app/Activity.html#setTheme(int)