从数据库填充的ListView中的复选框和onItemClick

时间:2013-09-27 09:38:55

标签: java android android-listview

我从数据库中填充了ListView。如何同时拥有复选框和onItemClick

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_multiple_choice, dataarray);
lv.setAdapter(adapter);
lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);