答案 0 :(得分:0)
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
T item = parent.getAdapter().getItem(position);
switch (item) { //or if, else
// logic here
}
}
});