[英]How to scale an image to the full screen using Flex/Actionscript
I am still struggling with transforming my app build in Java/Eclipse to Flex/Actionscript with Flashbuilder. 我仍在努力通过Flashbuilder将Java / Eclipse中的应用程序构建转换为Flex / Actionscript。 Now I can not find how I should implement an image to cover the hole screen.
现在,我找不到如何实现覆盖孔屏幕的图像。 In my current app I used relative layout and
在我当前的应用中,我使用了相对布局和
<ImageView
android:id="@+id/img"
android:scaleType="centerCrop"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_above="@id/bottom"
android:layout_below="@id/rubrik"
/>
but I do not find how I shall define this in Flex views. 但我找不到如何在Flex视图中对此进行定义。
Check out this SO question . 看看这个SO问题 。
You need to modify the scaleMode property of the Image spark tag (as documented here). 您需要修改Image spark标签的scaleMode属性(如此处所述)。
<s:Image scaleMode="BitmapScaleMode.STRETCH" x="0" y="0" height="100%" width="100%" source="@Embed('assets/example.jpg')"/>
You can play with either BitmapScaleMode.STRETCH, BitmapScaleMode.ZOOM, or BitmapScaleMode.LETTERBOX. 您可以玩BitmapScaleMode.STRETCH,BitmapScaleMode.ZOOM或BitmapScaleMode.LETTERBOX。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.