所以我有这个
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainParent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bgdark"
android:orientation="vertical"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="76dp"
android:src="@drawable/myheader_250x60"
/>
<ListView
android:id="@+id/mainListview"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
</LinearLayout>Note我现在编辑了这篇文章。我使用的是灰色背景图像,所以我认为这是在标题image.See的右/左可见的,用于显示问题的图像。
但是,将背景移到列表视图并没有解决问题。因此,它似乎是图像视图,不知何故有一个左/右边框灰色。因为我已经将宽度设置为"match_parent“,它应该采用最大宽度。

问题是在标题的顶部/右边有一个灰色像素边框?如果可能的话我想把它去掉。
发布于 2013-04-10 11:24:04
试试scaleType属性为您的ImageView。
阿诺斯韦-替代
android:src="@drawable/myheader_250x60" 为
android:background="@drawable/myheader_250x60" 发布于 2013-04-10 12:03:42
尝试使用fill_parent代替match_parent,但listView高度除外。wrap_content在listView高度中的应用
发布于 2013-04-10 12:10:58
设置此scletype属性
android:scaleType=fitXY并将图像设置为像这样的图像视图
android:background="@drawable/myheader_250x60" https://stackoverflow.com/questions/15924345
复制相似问题