SmartRefreshHorizontal icon indicating copy to clipboard operation
SmartRefreshHorizontal copied to clipboard

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

Open xiaobaDev opened this issue 9 months ago • 2 comments

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>

这样就能完美运行!

xiaobaDev avatar Apr 23 '25 13:04 xiaobaDev

怎么引入? implementation ("com.scwang.smart:refresh-layout-horizontal:2.0.0") 已经失效

Image

只到1.1.3了

long216 avatar Jul 14 '25 05:07 long216

怎么引入? implementation ("com.scwang.smart:refresh-layout-horizontal:2.0.0") 已经失效

Image 只到1.1.3了

implementation 'com.scwang.smart:refresh-layout-horizontal:2.0.0'

xiaobaDev avatar Jul 16 '25 02:07 xiaobaDev