I'm using the latest support design (compile 'com.android.support:design:+') which from 23.2 should have fixed the issue with RecyclerView inside ScrollView. The RecyclerView and the ExpandableListView scrolling both work perfectly. But when the ExpandableListView is too long and I want to be able to scroll the layout upwards so I could see the rest of it, the scrollview just doesn't work.
fragment :
myRecyclerView = (RecyclerView) view.findViewById(R.id.myRecyclerView); myRecyclerView.setNestedScrollingEnabled(false); LinearLayoutManager layoutManager = new LinearLayoutManager( mContext, LinearLayoutManager.HORIZONTAL, false ); layoutManager.setAutoMeasureEnabled(true); myRecyclerView.setLayoutManager(layoutManager); MyListAdapter myListAdapter = new MyListAdapter(recyclerDataList, getActivity()); myRecyclerView.setAdapter(myListAdapter); xml:
<ScrollView android:id="@+id/scrollView" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:fillViewport="true"> <RelativeLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" > <TextView android:id="@+id/headerText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="header text" android:layout_marginRight="10dp"/> <android.support.v7.widget.RecyclerView android:id="@+id/myRecyclerView" android:layout_below="@id/headerText" android:scrollbars="none" android:layout_width="match_parent" android:layout_height="wrap_content"/> <ExpandableListView android:id="@+id/expandableList" android:layout_below="@id/myRecyclerView" android:layout_width="match_parent" android:layout_height="match_parent" android:divider="1dp" android:dividerHeight="0dp" android:groupIndicator="@null" android:listSelector="@android:color/transparent" android:showDividers="middle" > </ExpandableListView> </RelativeLayout> </ScrollView>