Created dirty workaround in the library for item click feedback.
Line : touchListener.setSelectableItemBackgroundOnItemClick(view); <-- needs to be added in onItemClick.
recyclerView.addOnItemTouchListener(new SwipeableItemClickListener(this,
new OnItemClickListener() {
@Override
public void onItemClick(View view, int position) {
touchListener.setSelectableItemBackgroundOnItemClick(view);
if (view.getId() == R.id.txt_delete) {
touchListener.processPendingDismisses();
} else if (view.getId() == R.id.txt_undo) {
touchListener.undoPendingDismiss();
} else { // R.id.txt_data
Toast.makeText(RecyclerViewActivity.this, "Position " + position, LENGTH_SHORT).show();
}
}
}));
Created dirty workaround in the library for item click feedback. Line : touchListener.setSelectableItemBackgroundOnItemClick(view); <-- needs to be added in onItemClick.
recyclerView.addOnItemTouchListener(new SwipeableItemClickListener(this, new OnItemClickListener() { @Override public void onItemClick(View view, int position) { touchListener.setSelectableItemBackgroundOnItemClick(view); if (view.getId() == R.id.txt_delete) { touchListener.processPendingDismisses(); } else if (view.getId() == R.id.txt_undo) { touchListener.undoPendingDismiss(); } else { // R.id.txt_data Toast.makeText(RecyclerViewActivity.this, "Position " + position, LENGTH_SHORT).show(); } } }));