Flex使图像全屏 [英] Flex make image full screen

查看:226
本文介绍了Flex使图像全屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < s: Image x =0y =0height =100%width =100%source =@ Embed('assets / d.jpg')/> 

如何使图像以双击/触摸全屏幕(覆盖整个屏幕)在移动应用程序?

如果可能的话如何把它变回非全屏(回到正常)?

谢谢。

图片尺寸:W = 1920,H = 1200

解决方案

要删除白色条,您将设置 scaleMode 。默认值是Letterbox;这是你似乎正在使用。

如果将其设置为伸展,则会填充空白,而不显示白色边框。但是,它可能会通过不保持宽高比来扭曲图像。

when i run the image, it only appear in center with 2 blank white space in between.

<s:Image x="0" y="0" height="100%" width="100%" source="@Embed('assets/d.jpg')"/>

How can i make an image goes full screen (covering up the whole screen) with double tap/touch on mobile app?

And if possible how to turn it back to non-full screen (back to normal)?

thanks.

image size: W=1920, H=1200

解决方案

To remove the white bars you're going to have set the scaleMode of the Image tag. The default is Letterbox; which is what you appear to be using.

If you set it to stretch then it will fill the space, without the white border. However, it may distort the image by not maintaining the aspect ratio.

这篇关于Flex使图像全屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆