Unable to Scroll RecyclerView content , Tried everything still scrolling not working

by Reactorboy   Last Updated June 12, 2019 07:11 AM

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        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"
        android:background="@color/bgSec"
        tools:context=".MainActivity">
    <android.support.v4.widget.DrawerLayout
            android:id="@+id/drawer_layout"
            android:elevation="50dp"
            android:layout_width="match_parent"
            android:fitsSystemWindows="true"
            android:layout_height="match_parent">
        <include layout="@layout/app_bar"
                 android:layout_height="match_parent"
                 android:layout_width="match_parent"/>
        <android.support.design.widget.NavigationView
                android:id="@+id/nav_view"
                android:layout_gravity="start"
                android:fitsSystemWindows="true"
                app:headerLayout="@layout/header_layout"
                app:menu="@menu/side_menu"
                android:layout_width="wrap_content"
                android:layout_height="match_parent">
            <LinearLayout
                    android:layout_width="match_parent"
                    android:orientation="vertical"
                    android:layout_gravity="bottom"
                    android:background="#000"
                    android:layout_height="150dp">
            </LinearLayout>
        </android.support.design.widget.NavigationView>
    </android.support.v4.widget.DrawerLayout>

    <android.support.v7.widget.RecyclerView
            android:id="@+id/recycler_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent" android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"/>
</RelativeLayout>

and my other code is this

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content">
    <android.support.v7.widget.CardView
            android:id="@+id/card_view"
            android:background="@color/bgWhite"
            app:cardElevation="5dp"
            android:layout_width="match_parent"
            android:layout_margin="10dp"
            android:layout_height="300dp">

        <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="None"
                android:id="@+id/category_name"/>

    </android.support.v7.widget.CardView>
</RelativeLayout>


Related Questions


Updated May 22, 2018 18:11 PM

Updated July 19, 2016 08:04 AM

Updated May 22, 2018 13:11 PM

Updated August 08, 2017 11:11 AM