解决方案 »

  1.   

    你这里ListView的每一项有button的话,不能直接这么用SimpleAdapter,可以用ArrayAdapter,在重写的getView方法中inflate你写个一个xml布局,这个xml就是ListView的每个item的内容,大概可以如下:
    <LinearLayout
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="100dip"
            android:gravity="center_vertical">    <LinearLayout
                android:layout_width="0dip"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:orientation="vertical">
        <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:textAppearanceLarge"
                android:textColor="@android:color/black"/>
        <TextView
                android:id="@+id/second_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:textAppearanceMedium"
                android:textColor="@android:color/darker_gray"/>    </LinearLayout>
        <Button
                android:id="@+id/yourButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
    </LinearLayout>红色的那行代表设置的item行高
      

  2.   


    就是这行:android:layout_height="100dip"
      

  3.   

    同意这种说法,ListView的用法可以参考网上,我开始是看着书学的,抄的书上的代码,可是布局文件没给出,自己写的,结果有错误,后来从网上找的,一看就明白了,自己找找看看就明白了,很简单。就是楼上的方法