我有一个简单的ListView,它使用SimpleAdapter
s。
如何检测此ListView上的选择?
示例代码表示赞赏......
答案 0 :(得分:11)
尝试ListView.setOnItemClickListener():
listView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
... do something based on position ...
}
});