【问题标题】:How to create nested recycler view in android?如何在android中创建嵌套的回收器视图?
【发布时间】:2016-12-01 00:49:31
【问题描述】:

【问题讨论】:

标签: java android android-studio nestedrecyclerview


【解决方案1】:

创建一个线性布局的 xml 文件,并将线性布局的方向属性设置为水平。 例如,

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:weightsum="3">
    <ImageView
      android:layout_width="0dp"
      android:layout_height="match_parent"
      android:layout_weight="1"/>
    <ImageView
      android:layout_width="0dp"
      android:layout_height="match_parent"
      android:layout_weight="1"/>
    <ImageView
      android:layout_width="0dp"
      android:layout_height="match_parent"
      android:layout_weight="1"/>
</LinearLayout>

并在 recyclerView 适配器类中调用此布局。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-23
    • 1970-01-01
    • 1970-01-01
    • 2018-06-14
    • 2023-02-08
    相关资源
    最近更新 更多