リストビューを使用して、Base-Adpater クラスの項目を表示しています。ビューを次のように膨らませます
if (convertView == null || vi.findViewById(R.id.artist)== null)
{
View vi = inflater.inflate(R.layout.task_list_lay, null);
}
& ビューのクリックリスナーを次のように設定:
vi.setOnClickListener(commonListen);
リスト ビュー xml:
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/table"
android:layout_marginTop="0dip"
android:divider="#b5b5b5"
android:dividerHeight="1dp"
android:choiceMode="singleChoice" >
</ListView>
複数のアイテムをタップすると、それらのアイテムがすべて選択され、各ビューのクリック リスナー操作が実行されます。私はこの振る舞いを望んでいません。一度に1つのアイテムを選択したいだけです。