Recycler item not filling width without inflating from parent

I know similar questions have been asked multiple times, but the usual answer is simply use .inflate(R.layout.some_layout, parent, false). In my case, where the RecyclerView is nested within a ViewPager2 in combination with a TabLayout, the suggested solution does fill the width but then seems to lead to a fixed height for the recycler, which is not what i want.

Here is the current result, followed by the target:

Is there a solution that will not lead to me having to compromise on either filling the width XOR the height?

Here is the main layout which includes the viewpager and tabLayout, whose child is the recyclerview in question:

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

    <View
        android:id="@+id/vBgMask"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/core_sheet_mask" />

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginHorizontal="@dimen/core_sheet_default_margin_horizontal"
        android:layout_marginTop="@dimen/core_sheet_default_margin_top">

        <androidx.appcompat.widget.LinearLayoutCompat
            android:id="@+id/layoutContent"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center_horizontal"
            android:background="@drawable/core_bg_bottom_sheet"
            android:orientation="vertical"
            app:behavior_peekHeight="0dp"
            app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

            <ImageView
                android:id="@+id/btnClose"
                style="@style/BtnClose"
                android:layout_marginTop="@dimen/core_btnClose_marginTop"
                android:contentDescription="@null" />

            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:scrollbars="none"
                android:layout_marginHorizontal="@dimen/core_margin_screenHorizontal"
                android:layout_marginTop="6dp"
                android:layout_weight="1">

                <androidx.appcompat.widget.LinearLayoutCompat
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/tvIncidentTitle"
                        style="@style/Text.H4"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_columnSpan="2"
                        tools:text="Title of Incident" />

                    <com.google.android.material.tabs.TabLayout
                        android:id="@+id/tlIncidentInfo"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="start"
                        android:background="@color/quantum_white_100"
                        app:tabGravity="start"
                        app:tabMinWidth="60dp"
                        app:tabMode="fixed"
                        app:tabPaddingBottom="16dp"
                        app:tabPaddingEnd="16dp"
                        app:tabPaddingStart="16dp"
                        app:tabPaddingTop="16dp"
                        app:tabRippleColor="@null"
                        app:tabTextAppearance="@style/Text.Tab" />

                    <androidx.viewpager2.widget.ViewPager2
                        android:id="@+id/vpIncidentDetails"
                        android:layout_width="match_parent"
                        android:layout_height="0dp"
                        android:layout_weight="1"
                        android:paddingTop="24dp"
                        android:layout_marginBottom="42dp" />

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <TextView
                            style="@style/Text.Sub1"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/core_description"
                            android:textColor="@color/core_dark60" />

                        <TextView
                            android:id="@+id/tvIncidentDesc"
                            style="@style/Text.Body"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="4dp"
                            android:textColor="@color/core_textOverline"
                            tools:text="Description of Incident" />

                        <TextView
                            android:id="@+id/tvMeasuresHeader"
                            style="@style/Text.Sub1"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="24dp"
                            android:text="@string/flightplan_incident_view_measures"
                            android:textColor="@color/core_dark60"
                            android:visibility="visible" />


                        <TextView
                            android:id="@+id/tvMeasures"
                            style="@style/Text.Body"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="4dp"
                            android:textColor="@color/core_textOverline"
                            android:visibility="visible"
                            tools:text="Measures for incident hazard" />

                        <TextView
                            android:id="@+id/tvConsequencesHeader"
                            style="@style/Text.Sub1"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="24dp"
                            android:text="@string/flightplan_incident_view_consequences"
                            android:textColor="@color/core_dark60"
                            android:visibility="visible" />

                        <TextView
                            android:id="@+id/tvConsequences"
                            style="@style/Text.Body"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="4dp"
                            android:textColor="@color/core_textOverline"
                            android:visibility="visible"
                            tools:text="Consequences of incident hazard" />

                    </LinearLayout>
                </androidx.appcompat.widget.LinearLayoutCompat>
            </ScrollView>
        </androidx.appcompat.widget.LinearLayoutCompat>
    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout>

Here is the “Activity” tab’s layout which is basically the recyclerview in question:

<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView
    android:id="@+id/rvItems"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginVertical="@dimen/core_margin_s"
    android:orientation="vertical"
    android:nestedScrollingEnabled="false"
    android:background="@android:color/holo_blue_light"
    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:android="http://schemas.android.com/apk/res/android" />

and here is the layout of one of the items (the one containing a cardview in the images):

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:baselineAligned="false"
    android:background="@android:color/holo_red_light"
    android:orientation="horizontal">

    <include
        android:id="@+id/lTimeline"
        layout="@layout/timeline_node_layout" />

    <LinearLayout
        android:id="@+id/llContent"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginBottom="24dp"
        android:layout_weight="1"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tvActivityFollowUpStatusTitle"
            style="@style/TextAppearance.AppCompat.Caption"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/poppins_regular"
            tools:text="dd-mm-yyyy, hh:mm follow up added by Username" />

        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="9dp"
            android:background="@color/quantum_white_100"
            android:padding="12dp"
            app:cardCornerRadius="16dp"
            app:strokeColor="@color/core_dark10"
            app:strokeWidth="1dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/tvFollowUp"
                    style="@style/Text.Body2"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="12dp"
                    android:fontFamily="@font/poppins_regular"
                    android:textSize="14sp"
                    tools:text="I'm baby hexagon +1 lumbersexual ascot hammock distillery. Hammock umami taxidermy, ethical affogato disrupt dreamcatcher salvia hella jean shorts bicycle rights bruh banh mi. " />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rvDocuments"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="12dp"
                    android:nestedScrollingEnabled="false"
                    android:orientation="vertical"
                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

            </LinearLayout>

        </com.google.android.material.card.MaterialCardView>
    </LinearLayout>
</LinearLayout>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật