We like to use layouts for our data fields, and with the way resources can be organised, we can easily provide different layouts for different devices.
But for a specific device - say 920xt - we can actually have three different sizes of data fields depending on the number of fields on the page.
So the question is: how can we decide on which layout to load in onLayout()? Are there some status attribute somewhere we can test? Where might it be then?
Otherwise, we can see two other options, neither of which are optimal
- we can wait and load the layout at the first call of onUpdate, where we get a DC there we can then deduct the size of the data field. Loading resources
in the update phase seems like a very bad idea to me - at least it is something you always told to avoid in other UIs. - we can load all three layouts from the start and then decide on the layout to use in onUpdate (again based on the DC), call setLayout with the correct
layout, and last delegate to super. But this will take up additional resources...
What do you say?