1

I am using a recyclerview for my list of items. The first item has a video streaming from my camera, as soon as I scroll past the list of items, the first item gets recycled aka disrupts the streaming video until I get back to it. Is there a way I can prevent it from recycling and making sure my camera captures my video at all times without any disruption whether I scroll or not?

Thanks in advance!

1 Answers1

2

You could use this on the recyclerView to prevent it from recycling views of the specified viewType.

recyclerView.getRecycledViewPool().setMaxRecycledViews(VIEW_TYPE, 0);

Check out this post.

Tohu
  • 151
  • 2
  • 4