Skip to content

这个库2.0.0版本还是可用的,说坑的看我这,指导你 #45

@xiaobaDev

Description

@xiaobaDev

1.implementation 'com.scwang.smart:refresh-layout-horizontal:2.0.0'
2. 首先你必须版本是2.0.0,他的release tag里有。master上代码是错误的,footer居中了。
3. 其次布局里,SmartRefreshHorizontal的宽高必须是match_parent!他的高度外面要包一层容器来限制,比如

       <FrameLayout
          android:id="@+id/conLive"
          android:layout_width="match_parent"
          android:layout_height="210dp"
          tools:background="@color/black">
          <com.scwang.smart.refresh.horizontal.SmartRefreshHorizontal
            android:id="@+id/rvLiveContainer"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="30dp">
            <androidx.recyclerview.widget.RecyclerView
              android:id="@+id/rvLive"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              tools:listitem="@layout/party_room_live_item_layout" />
          </com.scwang.smart.refresh.horizontal.SmartRefreshHorizontal>
        </FrameLayout>

这样就能完美运行!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions