ده كود ال recyclerview
<LinearLayout android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:background="@color/white"
>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:titleTextColor="@color/white"
android:background="@color/theme_primary" />
<androidx.recyclerview.widget.RecyclerView 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:id="@+id/listviewProduct"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:reverseLayout="false"
tools:context=".MIAVIT">
</androidx.recyclerview.widget.RecyclerView>
وده كود كل عنصر داخل ال recyclerView
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width=“match_parent”
android:layout_height=“80dp”
xmlns:android=“http://schemas.android.com/apk/res/android”
<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:padding=“20dp”
android:background="?android:attr/selectableItemBackground"
android:layout_height="80dp"
>
<TextView
android:id="@+id/tv_product_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:fontFamily="sans-serif-condensed+"
android:padding="2dp"
android:text="TextView"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#212121"/>