Use/check recycler view adapter position

This commit is contained in:
M66B
2018-08-05 18:36:39 +00:00
parent b1cc40bb47
commit 959bfdf9df
5 changed files with 24 additions and 6 deletions

View File

@@ -75,7 +75,10 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
@Override
public void onClick(View view) {
EntityIdentity identity = filtered.get(getLayoutPosition());
int pos = getAdapterPosition();
if (pos == RecyclerView.NO_POSITION)
return;
EntityIdentity identity = filtered.get(pos);
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(