我有一些图像布局,我希望自动布局适合屏幕(这就是为什么我使用100%),但是当我加载大图像,它超出屏幕(实际上我可以设置MX:图片maxHeight = “” 但是这个值不是将是不同的屏幕分辨率相同)Flex mx:图像适合屏幕
我的布局示例:
<s:VGroup>
<s:BorderContainer borderStyle="solid" width="100%" height="100%>
<s:Scroller left="2" right="2" top="2" bottom="2">
<s:Group id="group">
<mx:Image id="currImg" />
</s:Group>
</s:Scroller>
</s:BorderContainer>
<!-- ..... -->
</s:VGroup>
更新:对我来说,最好的解决办法
<s:VGroup width="100%" height="100%">
<s:BorderContainer borderStyle="solid" width="100%" height="100%">
<s:Scroller left="2" right="2" top="2" bottom="2"maxWidth="{mx.core.FlexGlobals.topLevelApplication.widht}" maxHeight="{mx.core.FlexGlobals.topLevelApplication.height}">
<s:Group id="group" >
<mx:Image id="currImg" />