I have an activity that extends ListActivity and implementsOnScrollListener:
public class RecentItemsList extends GenericListActivity implements OnScrollListener
and in this class I use a class that extends ArrayAdapter:
public class RecentItemAdapter extends ArrayAdapter<Item>
I’m trying to bind a callback when one of the items in the list is clicked by the user, but the callback isn’t firing. Here’s my code:
setListAdapter(adapter);
ListView lv = getListView();
lv.setOnScrollListener(RecentItemsList.this);
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> a, View v, int position, long id) {
// do some stuff
}
});
But the OnItemClick event is never fired, but the scroll events fire properly. Any ideas?
For my specific case, there were focusable views in my row. apparently not possible: How to fire onListItemClick in Listactivity with buttons in list?