There are many approaches to how to implement the entire world of styles themes and dimens,
one approach is to use it like CSS - where every View in a Layout is set with his own style and dimen.
After much thought, we do not want to make our resources as a CSS style, why?
- Hard to maintain
- Hard to read
- Usually not re-usable. Once you set the resource for a View, it never changes because it’s too compilcated
Our approach should be to use styles, themes and dimens only when ever:
- There is a re-use of them in more than one View
- They are really going to change between different configuration (Screen sizes, orientation…)
Otherwise - simply do the styling directly in the xml layout.
No comments:
Post a Comment