ribot/easy-adapter

OnItemClickListener not recognized when using the EasyAdapter for normal ListView.

greenspand opened this issue · 3 comments

With this version 1.3 it looks as dough onItemClickListener doesn't work anymore. Could the support for RecyclerView have influenced this. Please see:
http://stackoverflow.com/questions/24885223/why-doesnt-recyclerview-have-onitemclicklistener

Hi, the OnItemClickListner is set in the ListView or RecyclerView so it should have nothing to do with the Adapters.
Do you mean it doesn't work with a ListView or a RecyclerView?
As that link says, RecyclerView doesn't support OnItemClickListener so it's not meant to work. ListViews should still be working as usual.

It doesn't work with a ListView. In conjunction to EasyAdapter I am using ButterKnife 6.0 to inject the listviews in the Activity. At first I thoguht it might be because of butterknife, so I injected the listView through findViewById, added the adapter and registered the listview to an OnItemClickListener. Despite avoiding using Butterknife I still didn't get an onItemClick event. Unfortunately The debugger doesn't spit out any messages. I will try different things and keep you posted.

Closing issue. Found the problem, the clicks were all caught by an invisible overlapping view. All good.