Replace的Android實現:FlyRefresh
Replace的Android實現,由 Zee Youn設計。FlyRefresh 史上最有特色的下拉刷新,你再拉,我就飛給你看。支持 ListView, RecyclerView, ScrollView。 特色 可以擴展收縮的header 支持自定義header view 支持自定義刷新動畫。
Features
- Default minimize configuration for Replace animation
- Expendable/Shrinkable header
- Support custom header view
- Support custom refresh animation
How to use
The basie usage in layou xml liks blow:
<com.race604.flyrefresh.FlyRefreshLayout
android:id="@+id/fly_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="24dp"
android:background="#FFFFFF"/>
</com.race604.flyrefresh.FlyRefreshLayout>
Or you can usePullHeaderLayoutfor more cofigurations, you can set custome attributes below:
<declare-styleable name="PullHeaderLayout">
<!-- hader size -->
<attr name="phl_header_height" format="dimension" />
<attr name="phl_header_expand_height" format="dimension" />
<attr name="phl_header_shrink_height" format="dimension" />
<!-- header view id -->
<attr name="phl_header" format="reference" />
<!-- content view id -->
<attr name="phl_content" format="reference" />
<!-- Float action button icon -->
<attr name="phl_action" format="reference" />
</declare-styleable>
For more, please turn to the source code.
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!
