You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please help me to find out better solutions to configurate custom views?
I have 20 different features on one screen. Each feature has its own view. The app has a dynamic theme. Each view has one input/state. I need to set theme settings for each view.
I hope that anybody has some ideas or any examples of how to do it in the best way.
The text was updated successfully, but these errors were encountered:
If you are using Android theme (xml defined), I am not sure there's a solution better than reinflate your views.
In case the theme is some configuration object (e.g. Kotlin data class), you can try representing your theme as a feature state and try to use it to get some reactivity on its updates
This way you will guarantee atomicity of the theme updates and make sure the view has received the update.
Note that your view has to be able to accept ThemedWrapper<ViewModel> to make this work.
I am pretty sure there is a more elegant way to push these updates, so try to test it and see what is working best for you.
Could you please help me to find out better solutions to configurate custom views?
I have 20 different features on one screen. Each feature has its own view. The app has a dynamic theme. Each view has one input/state. I need to set theme settings for each view.
I hope that anybody has some ideas or any examples of how to do it in the best way.
The text was updated successfully, but these errors were encountered: