Closed AndroidDeveloperMCT closed 3 years ago
You need to call playIndexThenPause Previous Player method after execute deletion
I am calling this
modelList.removeAt(position) notifyItemRemoved(position) notifyItemRangeChanged(position, modelList.size) if (index != -1) { PlayerViewAdapter.playIndexThenPausePreviousPlayer(index) }
but still not working
Any idea, what I am doing wrong? Please let me know
Try to remove item without notify item changes just remove item from model list and set viability of view holder that u want to delete to gone although call method of playing next item
modelList.remove(model) binding.root.setVisibility = View.GONE if (index != -1) { PlayerViewAdapter.playIndexThenPausePreviousPlayer(index) }
Tried above but still, the video does not start playing automatically
Great next step is scroll to position programically with animation it should work
Your problem depends on your code logic not belon the concept of implementing Exoplayer inside recyclerview
I don't think so it is because of code logic because I am running demo only and added the delete button at top/right.
It would be helpful to me if you please add some code for delete in TikTok screen and share the branch PLEASE
Email me if you would like to hire me for this task, have a great day buddy
Anyway thanks
When I remove any item from the recycler view, the next items come on the above position but not starts playing automatically.
Can anyone please help me out