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
Disclaimer: This feature will be helpful only for "not multimodular" projects.
It would be great to have an isolated resource directory for each feature.
Hierarchy would be like:
main
├── kotlin
├── res <-- Common resources
└── res-features <-- Features resources
├── feature1
│ ├── layout <-- Layouts, values, drawables, etc. suitable only for "feature1"
│ ├── values
│ └── drawable
├── feature2
└── feature3
Pros:
All feature resources are isolated and have their place
It is easy to navigate between resources in the scope of the feature
Feature's resource set contains a smaller number of files so you can better control what resources you have in the feature
Cons:
Feature resources should have prefix to avoid conflicts with an existing resource. For example layout, drawable, or string with the same name can be declared in multiple features resource sets. After resources merge it can cause unambiguous bugs. (Maybe this can be resolved with Android Lint)
You can't run an eye over all available resources and check if a similar resource already exists in a project. But to be honest you can't do it even if all resources are placed in one resource set.
The text was updated successfully, but these errors were encountered:
It would be great to have an isolated resource directory for each feature.
Hierarchy would be like:
Pros:
Cons:
The text was updated successfully, but these errors were encountered: