Hello guys!
I am still working on my app for iOS using Flash Builder to make it up to Apple Standards. I am discovering quite new things using flash builder. Actually tips and tricks. Here is one of them.
we normally use a list with label item renderer to have a list of items displayed. In my case I am displaying two items with a VGroup – title and the content. Normally the title spans and fits in one line on all iOS devices but the content is supposed to be have multiple lines.
Now, flash automatically word wraps the same if a width is specified and the text within it falls beyond the same but here is the problem, because of this, the list scrolls horizontally and/or vertically and is not easy to use.
I was trying to get around it and thinking why in god’s name this is happening. Then after long time I figured that it is the feature of flex to have the same width and height of every list type container – list, grids etc.
To have flex know that the content can be variable, we have to set the property variableRowHeight = “true” for list vertical layout.
Now, this alone doesn’t do the trick as the content will be still variable in width. So there is one more property that is similar to a word application – justify. So we set below properties:
variableRowHeight=”true” horizontalAlign=”justify”
Once we set these properties, the list is again how we want.
It took quite some time for me and I am hoping that it will be helpful to some of you!