我有一些圖像佈局,我希望自動佈局適合屏幕(這就是爲什麼我使用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" />