如何将长按项目设置为选中?这不起作用(单击时项目不会保持选中状态):
listView.setOnItemLongClickListener(new OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view,
int position, long id) {
listView.setSelection(position);
return true;
}
});