1

I have a layout comprising of parent recyclerview, and each row-item of it contains a textview and horizontal recyclerview. Now, I want all row recyclerviews to scroll together than allowing each row recyclerview to scroll individually. Kindly provide me with the working solution as I am completely stuck in here.

Below is the row-item of parent recyclerview layout:

<?xml version="1.0" encoding="utf-8"?>
    <layout xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools">

        <data>

            <variable
                name="channelData"
                type="ChannelData" />

        </data>

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/channelClick"
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:orientation="horizontal"
            android:weightSum="2">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:layout_gravity="center|left"
                android:layout_weight="1.5"
                android:gravity="center"
                android:padding="@dimen/dimen_8"
                android:singleLine="true"
                android:text="@{channelData.channelName}"
                tools:text="Hello " />

            <android.support.v7.widget.RecyclerView
                android:id="@+id/rvSerial"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:layout_gravity="center"
                android:layout_weight="0.5"
                android:nestedScrollingEnabled="false"
                android:orientation="horizontal"
                app:layoutManager="android.support.v7.widget.LinearLayoutManager"
                app:layout_behavior="@string/appbar_scrolling_view_behavior" />
        </LinearLayout>
    </layout>
Android1005
  • 155
  • 3
  • 14
  • What are you trying to achieve by doing that? Are you trying to create table-view or something? Then there is a library available : https://github.com/evrencoskun/TableView and if not then please provide your adapter code to understand your scenario. – Mayur Gajra Jan 15 '19 at 09:50
  • I just want the channel name i.e. the textview as fixed and recycler view which comprises of serial list corresponding to its channel id to scroll. But all the serial lists should move together, not the individual row. – Android1005 Jan 15 '19 at 09:55
  • 1
    Then please have a look at this answer : https://stackoverflow.com/a/44528962/9715339 it might help if you got any problems with that then just mention me by using @ and i'll see. – Mayur Gajra Jan 15 '19 at 10:05
  • @Mayur Thanks for your reply. Your reply proved very helpful to figure out the solution. – Android1005 Jan 15 '19 at 12:14

0 Answers0