0

I am using a horizontal RecyclerView inside a vertical ScrollView. The horizontal RecyclerView scrolls horizontally perfectly and so does the Vertical ScrollView until i try to scroll up and down on the recyclerView nothing happens.. the vertical scrolling seems to work only outside of the RecyclerView. How do i solve this? Here is my code of RecyclerView

 mRecyclerView.setLayoutManager(layoutManager);
    mRecyclerView.addOnScrollListener(new EndlessRecyclerOnScrollListener(linearLayoutManager) {
        @Override
        public void onLoadMore(int current_page) {
            Log.d("SCROLL PAST UPDATE", "You hit me");

            //maintain scroll position
            int lastFirstVisiblePosition = ((LinearLayoutManager) mRecyclerView.getLayoutManager()).findFirstCompletelyVisibleItemPosition();
            ((LinearLayoutManager) mRecyclerView.getLayoutManager()).scrollToPosition(lastFirstVisiblePosition);

            loadMore(jsonSubreddit);
        }
    });

enter image description here

In the image above the burger and chicken biryani are in the recyclerview which only scrolls horizontally if i do an up or down action on it it doesnt scroll vertical but it scrolls vertically only if vertically scrolling action is done outside of it

Shahid Sarwar
  • 1,209
  • 14
  • 29
  • Nesting scrollable Views is NEVER a good idea. –  May 18 '16 at 20:00
  • so how do i achieve it? There are plenty of apps especially the e-commerce ones which have both horizontal and vertical scrolling.. how do they achieve it? – Shahid Sarwar May 19 '16 at 06:48
  • Horizontal and Vertical mix well (see [this post](http://stackoverflow.com/questions/1399605/how-can-i-make-my-layout-scroll-both-horizontally-and-vertically)). But a RecyclerView is already a scrollable itself... –  May 19 '16 at 07:12

0 Answers0