删除ImageView周围的白色边框 [英] Remove white border around an ImageView
本文介绍了删除ImageView周围的白色边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的设计师不断在我的图像周围添加一些填充. 我希望图像贴在顶部,并填满屏幕的宽度.
My designer keeps adding a little padding around my image. I want the image the stick on the top and to fill out the width of the screen.
这是设计师的屏幕截图:
Here's a screenshot from the designer:
这是我的XML代码:
<ImageView
android:id="@+id/markertap_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/header_bootsverleih_xhdpi" />
推荐答案
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:id="@+id/imageView"
android:cropToPadding="false"
android:scaleType="fitXY" />
当我使用Splashscreen的ImageView时也遇到了同样的情况,这^对我有用.
Experienced the same when I used an ImageView for Splashscreen, this^ worked for me.
这篇关于删除ImageView周围的白色边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文