0

私は持っていて、特定のアイテムでSherlockListActivity埋めます。ListView私はそれのために私自身を使いますAdapter

しかし、ある状況では、次のようListViewに指定された1つのアイテムだけを入力する必要がありますsingle_list_item.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:gravity="top" >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="top"
            android:text="@string/singleItem1"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="top"
            android:text="@string/singleItem2"/>

</LinearLayout>

どうすればそれを達成できますか?ここでアダプタを使用する必要がありますか?もしそうなら、この状況に最適なのはどれですか?

4

1 に答える 1

0

このリストビューにはヘッダー/フッタービューを使用します。

于 2013-03-18T14:42:48.630 に答える