Avoid unknown error in EasyRecyclerView
This commit is contained in:
1 parent
857366f8d6
commit
0335e4338b
1 file changed
+6
-1
@@ -636,9 +636,14 @@ public class EasyRecyclerView extends RecyclerView implements View.OnClickListen
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
final int position = getChildPosition(view);
|
||||
final int position = getChildAdapterPosition(view);
|
||||
final long id = mAdapter.getItemId(position);
|
||||
|
||||
if (position < 0) {
|
||||
// I don't know why, but something wrong happend.
|
||||
return;
|
||||
}
|
||||
|
||||
boolean dispatchItemClick = true;
|
||||
|
||||
if (mChoiceMode != CHOICE_MODE_NONE) {
|
||||
|
||||
Reference in new issue
Block a user