A designer has sent me the following layout of a mobile view:
<?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="nuevaPortada" tabBarVisible="false"> <s:Image id="cabecera" source="@Embed('../img/home_cabecera.jpg')" scaleX="0.5" scaleY="0.5" smooth="true" horizontalCenter="0" /> <s:VGroup gap="0" width="100%" top="180"> <s:HGroup gap="0" width="100%"> <s:Image source="@Embed('../img/home_btn_imagen.jpg')" scaleX="0.5" scaleY="0.5" smooth="true" width="50%" /> <s:Image source="@Embed('../img/home_btn_producto.jpg')" scaleX="0.5" scaleY="0.5" smooth="true" width="50%" /> </s:HGroup> <s:HGroup gap="0" width="100%"> <s:Image source="@Embed('../img/home_btn_categoria.jpg')" scaleX="0.5" scaleY="0.5" smooth="true" width="50%" /> <s:Image source="@Embed('../img/home_btn_micuenta.jpg')" scaleX="0.5" scaleY="0.5" smooth="true" width="50%" /> </s:HGroup> </s:VGroup> </s:View> However that view is not working as expected. The problem is those images width=”50%” are working as expected, but original height is kept, causing an unwanted border between both HGroups. I know this can be solved through code, but the designer is expecting this problem to be solvable by only MXML, is there any attribute that can set the expected behavior? We don’t want designers to think that passing layouts to Flex is a sh*t ;P, as this would work as expected in HTML. Best regards,
