I have a custom view, the DateView(which extends a LinearLayout) which when given a date, presents it. The issue is with the sizes of the screens, I want the DateView to present the date differently on the small, normal, large and xlarge screens. The DateView extending a LinearLayout is useful because I can instantiate a DateView and addChild at any point.
Any ideas?
Wow! Ran into this age-old question that I asked. Anyways, this is how I solved the issue.
There are two ways (that I have come to like) to address this issue
includethe pattern in client XML layouts. In the client classes, load theincludeded layout and pass it to a DateViewManager class which exposes content modification methods.I’ve come to prefer the second method for it’s cleaner and simpler way of achieving the goal: use the Android resource management capabilities to provide for multiple screen types.