I have seen numerous posts in this channel about h...
# compose
j
I have seen numerous posts in this channel about handling your own config changes in a Compose app/activity, but I feel like I must be missing something. I am using a custom design system as described in the official documentation here. When I change the TextSize in accessibility settings or change the theme by using
AppCompatDelegate.setDefaultNightMode
I can see that
onConfigurationChanged
is called in the Activity, but nothing automatically changes in my composables. Is there more setup needed that I have missed in a thread?
s
But then when you force close the app and open it again, does it match the new updated text size as expected?
If yes, maybe you can try at the place where your theme is defined, to do something like this https://kotlinlang.slack.com/archives/CJLTWPH7S/p1649702605529519?thread_ts=1649700912.623109&cid=CJLTWPH7S but instead of
LocalConfiguration.current
maybe some equivalent for text style? I am not sure if one exists, I haven’t played with this myself.
Or maybe this gives you a hint about what to do https://kotlinlang.slack.com/archives/CJLTWPH7S/p1661546818567459?thread_ts=1661524832.340219&cid=CJLTWPH7S In this case, it was about using the composition local version of configuration instead of a static one, since the composition one did respect updating itself when the setting was changed.