I implemented a ListView
, and the method OnItemLongClick
to highlight the selected item, but when I select an item, if I scroll the ListView
, I find that another item is highlighted.
I'm using this code:
list.setOnItemLongClickListener(new OnItemLongClickListener() {
public boolean onItemLongClick(AdapterView<?> arg0, View arg1,
int pos, long id) {
arg1.setBackgroundColor(Color.BLUE);
return true;
}
});