## PullToRefreshLayout (下拉刷新控件)
UI需求:
![](https://box.kancloud.cn/8bd06ba8288de92a7876591196092c94_750x1334.png =200x360)
* java.lang.Object
* * FrameLayout
* * com.healthmall.android.widget.PullToRefreshLayout
public class PullToRefreshLayout
extends FrameLayout
下拉刷新 Created by luokj on 2017/8/11. <br/><br/>
* #### 嵌套类概要
嵌套类
| 限定符和类型 | 类和说明 |
| --- | --- |
| `static interface ` | [PullToRefreshLayout.OnChildScrollUpCallback](PullToRefreshLayout.OnChildScrollUpCallback.md) |
<br/><br/>
* #### 从类继承的方法 java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
<br/><br/>
* #### 方法详细资料
* #### setRefreshing
public void setRefreshing(boolean refreshing)
设置刷新状态
参数:
`refreshing` - 刷新状态 <br/><br/>
* #### getRefreshing
public boolean getRefreshing()
获取刷新状态<br/><br/>
* #### setOnRefreshListener
public void setOnRefreshListener(android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener onRefreshListener)
设置下拉刷新监听<br/><br/>
* #### setOnChildScrollUpCallback
public void setOnChildScrollUpCallback(@Nullable
[PullToRefreshLayout.OnChildScrollUpCallback](PullToRefreshLayout.OnChildScrollUpCallback.md) callback)
设置子布局能否往上滑动的回调。在子布局并非可滑动布局而子布局内又有滑动布局时,或者子布局并非最终决定整体布局是否到顶时需要自定义此回调。<br/><br/>
* #### setTriggerOffset
public void setTriggerOffset(int offset)
设置下拉触发刷新的具体
参数:
`offset` - 触发距离,单位px <br/><br/>
* #### setRefreshHeader
public void setRefreshHeader(com.healthmall.android.widget.RefreshHeader header)
设置自定义下拉变化头部 <br/><br/>
* #### setRefreshable
public void setRefreshable(boolean refreshable)
设置是否需要下拉刷新 <br/><br/>
* #### xml使用
* 跟系统控件SwipeRefreshLayout一样,作为被下拉布局的父布局,切最外层子布局只能存在一个:
<com.gzdxjk.healthmall_android_library.widget.PullToRefreshLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:load_in_transparent="true"
app:load_new_standard="true">
<最外层子布局>
<内容/>
</最外层子布局>
</com.gzdxjk.healthmall_android_library.widget.PullToRefreshLayout>