如何选择要全屏显示的图像分辨率? [英] How to choose an image resolution to be shown fullscreen?

查看:27
本文介绍了如何选择要全屏显示的图像分辨率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个实际为 393 x 21 像素的图像,我想将其设置在我的视图底部.

I have an image which is actually 393 x 21 px, which I would like to set on the bottom of my View.

问题是,即使我将宽度和高度设置为fill_parent,我的图像在屏幕底部的中间仍然很小,并且在左侧和右侧我有一个空字段.

The problem is that, even if i set the width and the height to fill_parent, my image stays very small in the middle of the screen bottom and on the left and the right I have an empty field.

我可以通过手动减小图像宽度来解决这个问题,但是还有其他解决方案可以将图像设置为全屏吗?

I can resolve this by reducing the Image width size mannualy but is ther any other solution whic could set the image in fullscreen ?

谢谢.

推荐答案

//在你的xml中Image属性为

//in your xml Image attribute as

android:scaleType="fitXY"

or//以编程方式使用 thru

or //using thru programatically

imgview.setScaleType(ScaleType.FIT_XY);

这篇关于如何选择要全屏显示的图像分辨率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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