|
| 1 | +# CollapsingRefresh |
| 2 | +AppBarLayout+ViewPager+RecyclerView的刷新功能。 |
| 3 | + |
| 4 | +## 效果演示 |
| 5 | +| 图一 | 图二 | 图三 | |
| 6 | +| ------------ | ------------------------- | ----------- | |
| 7 | +|  |  | |
| 8 | + |
| 9 | +## Demo |
| 10 | +[下载 APK](apk/app-debug.apk) |
| 11 | + |
| 12 | +## 布局引用 |
| 13 | +``` |
| 14 | + <com.ckr.smartrefresh.SmartRefreshLayout |
| 15 | + xmlns:android="http://schemas.android.com/apk/res/android" |
| 16 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
| 17 | + android:id="@+id/refreshLayout" |
| 18 | + android:layout_width="match_parent" |
| 19 | + android:layout_height="match_parent" |
| 20 | + app:srlDisableContentWhenLoading="true" |
| 21 | + app:srlDisableContentWhenRefresh="true" |
| 22 | + app:srlEnableAutoLoadmore="false" |
| 23 | + app:srlEnableHeaderTranslationContent="true" |
| 24 | + app:srlEnableLoadmore="true"> |
| 25 | + |
| 26 | + <com.ckr.smartrefresh.header.ClassicsHeader |
| 27 | + android:id="@+id/classicsHeader" |
| 28 | + android:layout_width="match_parent" |
| 29 | + android:layout_height="wrap_content" |
| 30 | + app:srlClassicsSpinnerStyle="Translate"/> |
| 31 | + |
| 32 | + <com.ckr.smoothappbarlayout.SmoothRecyclerView |
| 33 | + android:id="@+id/recyclerView" |
| 34 | + android:layout_width="match_parent" |
| 35 | + android:layout_height="wrap_content" |
| 36 | + android:clipToPadding="false" |
| 37 | + android:paddingBottom="5dp" |
| 38 | + android:paddingLeft="5dp" |
| 39 | + android:paddingRight="5dp" |
| 40 | + android:paddingTop="0dp"/> |
| 41 | + |
| 42 | + <com.ckr.smartrefresh.footer.ClassicsFooter |
| 43 | + android:layout_width="match_parent" |
| 44 | + android:layout_height="wrap_content" |
| 45 | + app:srlClassicsSpinnerStyle="Translate"/> |
| 46 | + </com.ckr.smartrefresh.SmartRefreshLayout> |
| 47 | +``` |
| 48 | + |
| 49 | +## 感谢 |
| 50 | +[SmartRefreshLayout](https://github.com/scwang90/SmartRefreshLayout) |
| 51 | +[smooth-app-bar-layout](https://github.com/henrytao-me/smooth-app-bar-layout) |
| 52 | + |
| 53 | +## 更新日志 |
| 54 | +---------- |
| 55 | +* **1.0.1-beta(进行中)** |
| 56 | + * 重构代码 |
| 57 | + |
| 58 | +* **1.0.1-alpha** |
| 59 | + * 实现CollapsingToolbarLayout+ViewPager+RecyclerView的下拉刷新和上拉加载功能 |
| 60 | + |
| 61 | +License |
| 62 | +------- |
| 63 | + |
| 64 | + Copyright 2018 ckrgithub |
| 65 | + |
| 66 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 67 | + you may not use this file except in compliance with the License. |
| 68 | + You may obtain a copy of the License at |
| 69 | + |
| 70 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 71 | + |
| 72 | + Unless required by applicable law or agreed to in writing, software |
| 73 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 74 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 75 | + See the License for the specific language governing permissions and |
| 76 | + limitations under the License. |
0 commit comments