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

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

问题描述

当我运行图像时,它只出现在中间,中间有 2 个空白区域.

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)?

谢谢.

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

推荐答案

要删除您将要设置的白条 scaleMode.默认为信箱;这就是您似乎正在使用的.

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天全站免登陆