我正在渲染一个ListView
包含图像的图像。我希望摆脱灰色。我该如何摆脱呢?似乎很奇怪而且很容易,但是我无法找出解决方案。
list_View.xml
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#efefef"
android:orientation="vertical" >
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="#00000000"
android:divider="@android:color/black"
android:dividerHeight="1.0sp"
android:textColor="#000000" />
</RelativeLayout>
image.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#A4A4A4"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageStatus"
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
</LinearLayout>
<ImageView
android:id="@+id/imageStatus"
android:layout_alignParentTop="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY" <!-- This will Help you -->
android:adjustViewBounds="true" />
您也可以使用>>>设置最小宽度和高度
android:minHeight="120dp"
android:minWidth="100dp"
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句