如何选择一个图像分辨率所显示全屏呢? [英] How to choose an image resolution to be shown fullscreen?
本文介绍了如何选择一个图像分辨率所显示全屏呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个形象,这其实是393×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.
我可以通过降低图像的宽度尺寸mannualy解决此,而是疗法WHIC可以设置图像全屏任何其他解决方案?
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图像属性为
//in your xml Image attribute as
android:scaleType="fitXY"
或//使用直通编程
or //using thru programatically
imgview.setScaleType(ScaleType.FIT_XY);
这篇关于如何选择一个图像分辨率所显示全屏呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文