ribot / easy-adapter

[DEPRECATED] Easy Adapters library for Android
http://ribot.github.io
Apache License 2.0
421 stars 50 forks source link

OnItemClickListener not recognized when using the EasyAdapter for normal ListView. #18

Closed greenspand closed 10 years ago

greenspand commented 10 years ago

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

ivacf commented 10 years ago

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.

greenspand commented 10 years ago

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.

greenspand commented 10 years ago

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