In Flex Mobile I have a few buttons in the action bar. On devices with very small screen (such as the HTC Wildfire) not all buttons can be shown. Is there a way to tell Flex to hide an element when it doens’t fit? I know it is possible by using states and test the width of the screen but I hope there is another way..
Share
Here’s a really simple Spark layout class that lays out the objects horizontally, dropping any items that won’t fit.
Writing layouts that have all the functionality of a typical Flex layout class is not trivial. But you can certainly do simple things like the above, to iterate over the child objects, set their size/position, and in this case, not bother rendering things that won’t fit.