What is the recommended way to handle common strings and dimensions? Should we store them inside .xml or should we have them as global variables?
s
Stylianos Gakis
12/06/2021, 9:14 AM
It’s still Android, all of these have a reason to exist like strings and how they make having the app in different languages easy. Global variables sounds like you’d be re-inventing the wheel when you need to solve those same problems.
➕ 1
y
yschimke
12/06/2021, 9:26 AM
I agree 100%, but it's interesting to think through what this looks like for Compose multi platform? Is there any natural abstraction for this?
s
Stylianos Gakis
12/06/2021, 9:43 AM
Having the composables still receive the text as strings but resolving it higher up in a platform-specific place is the first thing that comes to mind. Otherwise not aware of any library that abstracts this out.