Indexoutofboundsexception Whenever I Want To Delete An Recyclerview Item
I manage to make a list with RecyclerView and now I want to delete a row by clicking on that row. But when I click on it, nothing happens and when I click again I get IndexOutOfBou
Solution 1:
Replace:
@Override
publicvoidonItemClick(View view, int position) {
movieList.remove(position);
}
With:
@Override
publicvoidonItemClick(View view, int position) {
movieList.remove(position);
adapter.notifyItemRemoved(position);
}
Post a Comment for "Indexoutofboundsexception Whenever I Want To Delete An Recyclerview Item"