-3
I added a Recyclerview in inside a Drawelayout, but for some reason the Recyclerview scroll doesn’t work
acitivty_main.xml
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_gravity="start"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:background="?android:attr/windowBackground"
android:orientation="vertical"
android:layout_height="match_parent">
<include
layout="@layout/main_drawer_header"
android:background="?attr/colorPrimary"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="4dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
</LinearLayout>
</LinearLayout>
</androidx.drawerlayout.widget.DrawerLayout>
Mainactivity
//A Lista vai conter os arquivo de um diretório, igual um "FileExplorer"
recyclerAdapter = new RecyclerAdapter(Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + PATH);
recyclerView.setAdapter(recyclerAdapter);