I am creating an EPG-like view for which I have several horizontal RecyclerView (in the form of television programs) encapsulated inside LinearLayout. When I view one of the RecyclerView, I want the rest of the views to scroll together.
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); layoutContent.setWeightSum(epg.getChannels().size()); //prepare recycler views and add into layoutContent based on epg channels for(EPG.Channel ch : epg.getChannels()){ AppLog.error(TAG, "Creating RecyclerView for: " + ch.getDisplayName()); //create new recycler view final RecyclerView rv = new RecyclerView(layoutContent.getContext()); lstRecyclerViews.add(rv); //set layout manager rv.setLayoutManager(new LinearLayoutManager(layoutContent.getContext(), LinearLayoutManager.HORIZONTAL, false)); //create adapter rv.setAdapter(new MyAdapter(ch.getPrograms())); rv.setItemAnimator(new DefaultItemAnimator()); //add into parent layout LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 0); lp.weight = 1; layoutContent.addView(rv, lp); } }
I tried to add a scroll listener to my views, but the RecyclerView.OnScrollListener onScrolled method confuses me, because I cannot figure out how to scroll through other views.
Any help / suggestion would be helpful.

android scroll android-recyclerview epg
waqaslam
source share