I am developing an application showing a list of games, inside each itemView item, I also have a list of videos to be displayed. preview and structure.

I deploy RecyclerView as a view of the root window, and then for the video, I used the RecyclerView grid-style to display, so here we got the nested RecyclerView structure.
But there are problems, because the number of videos is incompatible between games, I donโt want RecyclerView from the list of videos to scroll, so the best way is to stretch the viewing height dynamically, it depends on how many lines it has. I heard a disappointing conclusion that there isnโt a way to achieve this from the internet. It's true? can any alternative do this?
So far, I am not going to solve this issue, so I manually change the height of the RecyclerView as a temporary solution.
videoGridRecyclerView.getLayoutParams().height = rowCount * 242;
Given that video streams have the same structure, it would be nice if these RecyclerViews could reuse this element of a video ad when they are already scrolling from the screen, this should significantly improve performance.
Then I tried to propagate a specific RecycledViewPool to each nested RecyclerViews.
public class MainActivity extends Activity { private RecyclerView.RecycledViewPool mViewPool; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);
Even I made this effort, I notice all the time that the onCreateViewHolder executable method and incrementing inflation counter increase while scrolling through the root RecyclerView in a circular way.
private static class VideoAdapter extends RecyclerView.Adapter<GridViewHolder> { private List<Video> mVideoList; private VideoAdapter(List<Video> videoList) { mVideoList = videoList; }
Will my idea work? or am i doing it wrong? I want to achieve this effect, any other advice, even if it is not about RecyclerView, will be grateful, thanks in advance.