English | 中文
As an extension library of SmartRefreshLayout, SmartRefreshHorizontal realizes the function of horizontal refresh and loading. Although it is an independent open source library, it has not been implemented repeatedly. Instead, SmartRefreshLayout is encapsulated and converted to support horizontal refresh. So SmartRefreshHorizontal inherits all the features of SmartRefreshLayout, but the direction changes to horizontal.
- Support horizontal scrol.
- Support all features of SmartRefreshLayout.
- Support AndroidX
Goods | ViewPager |
---|---|
LoadData |
---|
//2.x
implementation 'com.scwang.smart:refresh-layout-horizontal:2.0.0'
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1'
implementation 'com.scwang.smart:refresh-header-classics:2.0.1'
implementation 'com.scwang.smart:refresh-header-material:2.0.1'
//1.x
implementation 'com.scwang.smartrefresh:SmartRefreshHorizontal:1.1.2'
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.3'
//androidx
implementation 'com.scwang.smartrefresh:SmartRefreshHorizontal:1.1.2-x'
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.3'
<?xml version="1.0" encoding="utf-8"?>
<com.scwang.smartrefresh.horizontal.SmartRefreshHorizontal xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
android:orientation="horizontal"
android:background="#fff" />
</com.scwang.smartrefresh.horizontal.SmartRefreshHorizontal>
RefreshLayout refreshLayout = root.findViewById(R.id.refreshLayout);
refreshLayout.setRefreshHeader(new MaterialHeader(root.getContext()));
refreshLayout.setRefreshFooter(new RefreshFooterWrapper(new MaterialHeader(root.getContext())), -1, -2);
This library is no need to add confusing filtering code, and it has been confusing tests pass, if you after the confusion in the use of the project appear problem, please inform me.
If you like this library's design, feel it help to you, you can point the upper right corner "Star" support Thank you! ^ _ ^ You can also click the PayPal below to ask the author to drink a cup of coffee.
Contact me: scwang90@hotmail.com
SmartRefreshLayout
MultiWaveHeader
Copyright 2019 scwang90
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.