我想建立一个应用程序,其中有许多项目的列表视图,但我无法更改或设置单个项目的宽度和高度。我到处搜索,我得到的答案是使宽度FILL_PARENT,但它不是为我工作...如何更改android中listviews项的宽度和高度?
请帮助....在此先感谢...这里是代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="3dp"
tools:context=".CustomListViewAndroidExample" >
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="1"/>
</RelativeLayout>
其中是您的列表适配器视图(你想添加到你的列表视图)?发布xml代码和您的适配器类 – k0sh
使用自定义视图。 – Aniruddha