Closed bvanhou closed 9 years ago
This is what you have in the sample and it works just need to alter the Read.me file
final SwipeToDismissTouchListener<RecyclerViewAdapter> touchListener =
new SwipeToDismissTouchListener<>(
new RecyclerViewAdapter(recyclerView),
new SwipeToDismissTouchListener.DismissCallbacks<RecyclerViewAdapter>() {
@Override
public boolean canDismiss(int position) {
return true;
}
@Override
public void onDismiss(RecyclerViewAdapter recyclerViewAdapter, int position) {
mAdapter.remove(items.get(position);
}
});
Thanks a lot, the markdown preview was doing something wrong. It's fixed now!
You currently have the documentation on the Usage Read.me incorrect for the RecyclerView. Something small though it drove me insane figuring out what was wrong.
It is currently : final SwipeToDismissTouchListener touchListener =
new SwipeToDismissTouchListener
It should be : final SwipeToDismissTouchListener touchListener =
new SwipeToDismissTouchListener<>
Otherwise this is fantastic man! great job.