【发布时间】:2014-08-07 01:27:48
【问题描述】:
我正在尝试构建一个应用程序,其中有一个包含许多项目的列表视图,但我无法更改或设置单个项目的宽度和高度。我到处搜索,我得到的答案是width fill_parent,但它不适合我...
请帮助....提前致谢...这里是代码:
<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 代码和您的适配器类
标签: android android-intent android-activity