android RecyclerView的Linear布局案例
1、先创建 activity_recycle_view.xml 和 activity_recycler_linear_item.xml 如下: <? xml version="1.0" encoding="utf-8" ?> < androidx.constraintlayout.widget.ConstraintLayout 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" tools:context =".RecycleViewActivity" > < androidx.recyclerview.widget.RecyclerView android:id ="@+id/re1" android:layout_width ="match_parent" android:layout_height ="match_parent" tools:layout