How to choose an image resolution to be shown fullscreen?

半腔热情 提交于 2019-12-18 07:16:06

问题


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

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 ?

Thank you.


回答1:


//in your xml Image attribute as

android:scaleType="fitXY"

or //using thru programatically

imgview.setScaleType(ScaleType.FIT_XY);


来源:https://stackoverflow.com/questions/9477971/how-to-choose-an-image-resolution-to-be-shown-fullscreen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!