I have an enum class with @StringRes property, whi...
# android-architecture
s
I have an enum class with @StringRes property, which I want to use in a few feature modules. I don’t want to put it directly in domain module, since it has android references, so I need to map into it. Where do I put this enum so all feature modules can access it, and to still have a way to map into it from domain module?
j
shared UI layer
s
yeah, I wanted to avoid this, but I’m not sure what else can I do
j
it is a UI model that is shared to all features, so I don't see the problem
s
yes, this is indeed an answer to my problem, I just feel I will overengineer this
v
Access the string resources using android references from data layer and pass just the strings to domain layer and above layer if you don't want shared UI shared layer...
123 Views