Package io.rong.imkit.widget.refresh

## Class SmartRefreshLayout

- All Implemented Interfaces:

      public class SmartRefreshLayout

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `public class` | `SmartRefreshLayout.LayoutParams` |
    `public class` | `SmartRefreshLayout.RefreshKernelImpl` | 刷新布局核心功能接口 为功能复杂的 Header 或者 Footer 开放的接口

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SmartRefreshLayout(Context context)` |
    `SmartRefreshLayout(Context context, AttributeSet attrs)` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `computeScroll()` | 重写 computeScroll 来完成 smart 的特定功能 1.越界回弹 2.
    `boolean` | `dispatchTouchEvent(MotionEvent e)` | 事件分发 （手势核心） 1.多点触摸 2.
    `void` | `requestDisallowInterceptTouchEvent(boolean disallowIntercept)` | 这段代码来自谷歌官方的 SwipeRefreshLayout 主要是为了让老版本的 ListView 能平滑的下拉 而选择性的屏蔽 requestDisallowInterceptTouchEvent 应用场景已经在英文注释中解释清楚，大部分第三方下拉刷新库都保留了这段代码，本库也不例外
    `LayoutParams` | `generateLayoutParams(AttributeSet attrs)` |
    `int` | `getNestedScrollAxes()` |
    `boolean` | `onStartNestedScroll(View child, View target, int nestedScrollAxes)` |
    `void` | `onNestedScrollAccepted(View child, View target, int axes)` |
    `void` | `onNestedPreScroll(View target, int dx, int dy, Array<int> consumed)` |
    `void` | `onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed)` |
    `boolean` | `onNestedPreFling(View target, float velocityX, float velocityY)` |
    `boolean` | `onNestedFling(View target, float velocityX, float velocityY, boolean consumed)` |
    `void` | `onStopNestedScroll(View target)` |
    `void` | `setNestedScrollingEnabled(boolean enabled)` |
    `boolean` | `isNestedScrollingEnabled()` |
    `RefreshLayout` | `setHeaderHeight(float heightDp)` | Set the Header's height.
    `RefreshLayout` | `setHeaderHeightPx(int height)` | 设置 Header 高度
    `RefreshLayout` | `setFooterHeight(float heightDp)` | Set the Footer's height.
    `RefreshLayout` | `setFooterHeightPx(int height)` | 设置 Footer 高度
    `RefreshLayout` | `setHeaderInsetStart(float insetDp)` | Set the Header's start offset（see srlHeaderInsetStart in the RepastPracticeActivity XML in demo-app for the practical application）.
    `RefreshLayout` | `setHeaderInsetStartPx(int insetPx)` | Set the Header's start offset（see srlHeaderInsetStart in the RepastPracticeActivity XML in demo-app for the practical application）.
    `RefreshLayout` | `setFooterInsetStart(float insetDp)` | Set the Footer's start offset.
    `RefreshLayout` | `setFooterInsetStartPx(int insetPx)` | Set the Footer's start offset.
    `RefreshLayout` | `setDragRate(float rate)` | Set the damping effect.
    `RefreshLayout` | `setHeaderMaxDragRate(float rate)` | Set the ratio of the maximum height to drag header.
    `RefreshLayout` | `setFooterMaxDragRate(float rate)` | Set the ratio of the maximum height to drag footer.
    `RefreshLayout` | `setHeaderTriggerRate(float rate)` | Set the ratio at which the refresh is triggered.
    `RefreshLayout` | `setFooterTriggerRate(float rate)` | Set the ratio at which the load more is triggered.
    `RefreshLayout` | `setReboundInterpolator(Interpolator interpolator)` | Set the rebound interpolator.
    `RefreshLayout` | `setReboundDuration(int duration)` | Set the duration of the rebound animation.
    `RefreshLayout` | `setEnableLoadMore(boolean enabled)` | Set whether to enable pull-up loading more (enabled by default).
    `RefreshLayout` | `setEnableRefresh(boolean enabled)` | 是否启用下拉刷新（默认启用）
    `RefreshLayout` | `setEnableHeaderTranslationContent(boolean enabled)` | Whether to enable pull-down refresh (enabled by default).
    `RefreshLayout` | `setEnableFooterTranslationContent(boolean enabled)` | Set whether to pull up the content while pulling up the header.
    `RefreshLayout` | `setEnableAutoLoadMore(boolean enabled)` | Sets whether to listen for the list to trigger a load event when scrolling to the bottom (default true).
    `RefreshLayout` | `setEnableOverScrollBounce(boolean enabled)` | Set whether to enable cross-border rebound function.
    `RefreshLayout` | `setEnablePureScrollMode(boolean enabled)` | Set whether to enable the pure scroll mode.
    `RefreshLayout` | `setEnableScrollContentWhenLoaded(boolean enabled)` | Set whether to scroll the content to display new data after loading more complete.
    `RefreshLayout` | `setEnableScrollContentWhenRefreshed(boolean enabled)` | Set whether to scroll the content to display new data after the refresh is complete.
    `RefreshLayout` | `setEnableLoadMoreWhenContentNotFull(boolean enabled)` | Set whether to pull up and load more when the content is not full of one page.
    `RefreshLayout` | `setEnableOverScrollDrag(boolean enabled)` | Set whether to enable cross-border drag (imitation iphone effect).
    `RefreshLayout` | `setEnableFooterFollowWhenNoMoreData(boolean enabled)` | Set whether or not Footer follows the content after there is no more data.
    `RefreshLayout` | `setEnableClipHeaderWhenFixedBehind(boolean enabled)` | Set whether to clip header when the Header is in the FixedBehind state.
    `RefreshLayout` | `setEnableClipFooterWhenFixedBehind(boolean enabled)` | Set whether to clip footer when the Footer is in the FixedBehind state.
    `RefreshLayout` | `setEnableNestedScroll(boolean enabled)` | Setting whether nesting scrolling is enabled (default off + smart on).
    `RefreshLayout` | `setFixedHeaderViewId(int id)` | 设置固定在 Header 下方的视图Id，可以在 Footer 上下滚动的时候保持不跟谁滚动
    `RefreshLayout` | `setFixedFooterViewId(int id)` | 设置固定在 Footer 上方的视图Id，可以在 Header 上下滚动的时候保持不跟谁滚动
    `RefreshLayout` | `setHeaderTranslationViewId(int id)` | 设置在 Header 上下滚动时，需要跟随滚动的视图Id，默认整个内容视图
    `RefreshLayout` | `setFooterTranslationViewId(int id)` | 设置在 Footer 上下滚动时，需要跟随滚动的视图Id，默认整个内容视图
    `RefreshLayout` | `setDisableContentWhenRefresh(boolean disable)` | Set whether to enable the action content view when refreshing.
    `RefreshLayout` | `setDisableContentWhenLoading(boolean disable)` | Set whether to enable the action content view when loading.
    `RefreshLayout` | `setRefreshHeader(RefreshHeader header)` | Set the header of RefreshLayout.
    `RefreshLayout` | `setRefreshHeader(RefreshHeader header, int width, int height)` | Set the header of RefreshLayout.
    `RefreshLayout` | `setRefreshFooter(RefreshFooter footer)` | Set the footer of RefreshLayout.
    `RefreshLayout` | `setRefreshFooter(RefreshFooter footer, int width, int height)` | Set the footer of RefreshLayout.
    `RefreshLayout` | `setRefreshContent(View content)` | Set the content of RefreshLayout（Suitable for non-XML pages, not suitable for replacing empty layouts）。 设置指定的 Content（适用于非XML页面，不适合用替换空布局）
    `RefreshLayout` | `setRefreshContent(View content, int width, int height)` | Set the content of RefreshLayout（Suitable for non-XML pages, not suitable for replacing empty layouts）.
    `RefreshFooter` | `getRefreshFooter()` | Get footer of RefreshLayout 获取当前 Footer
    `RefreshHeader` | `getRefreshHeader()` | Get header of RefreshLayout 获取当前 Header
    `RefreshState` | `getState()` | Get the current state of RefreshLayout 获取当前状态
    `ViewGroup` | `getLayout()` | Get the ViewGroup of RefreshLayout 获取实体布局视图
    `RefreshLayout` | `setOnRefreshListener(OnRefreshListener listener)` | Set refresh listener separately.
    `RefreshLayout` | `setOnLoadMoreListener(OnLoadMoreListener listener)` | Set load more listener separately.
    `RefreshLayout` | `setOnRefreshLoadMoreListener(OnRefreshLoadMoreListener listener)` | Set refresh and load listeners at the same time.
    `RefreshLayout` | `setOnMultiListener(OnMultiListener listener)` | Set up a multi-function listener.
    `RefreshLayout` | `setPrimaryColors(Array<int> primaryColors)` | Set theme color int (primaryColor and accentColor).
    `RefreshLayout` | `setPrimaryColorsId(Array<int> primaryColorId)` | Set theme color id (primaryColor and accentColor).
    `RefreshLayout` | `setScrollBoundaryDecider(ScrollBoundaryDecider boundary)` | Set the scroll boundary Decider, Can customize when you can refresh.
    `RefreshLayout` | `setNoMoreData(boolean noMoreData)` | Restore the original state after finishLoadMoreWithNoMoreData.
    `RefreshLayout` | `resetNoMoreData()` | Restore the original state after finishLoadMoreWithNoMoreData.
    `RefreshLayout` | `finishRefresh()` | finish refresh.
    `RefreshLayout` | `finishLoadMore()` | finish load more.
    `RefreshLayout` | `finishRefresh(int delayed)` | finish refresh.
    `RefreshLayout` | `finishRefresh(boolean success)` | finish refresh.
    `RefreshLayout` | `finishRefresh(int delayed, boolean success, Boolean noMoreData)` | finish refresh.
    `RefreshLayout` | `finishRefreshWithNoMoreData()` | finish load more with no more data.
    `RefreshLayout` | `finishLoadMore(int delayed)` | finish load more.
    `RefreshLayout` | `finishLoadMore(boolean success)` | finish load more.
    `RefreshLayout` | `finishLoadMore(int delayed, boolean success, boolean noMoreData)` | finish load more.
    `RefreshLayout` | `finishLoadMoreWithNoMoreData()` | finish load more with no more data.
    `RefreshLayout` | `closeHeaderOrFooter()` | Close the Header or Footer, can't replace finishRefresh and finishLoadMore.
    `boolean` | `autoRefresh()` | Display refresh animation and trigger refresh event.
    `boolean` | `autoRefresh(int delayed)` | Display refresh animation and trigger refresh event, Delayed start.
    `boolean` | `autoRefreshAnimationOnly()` | Display refresh animation without triggering events.
    `boolean` | `autoRefresh(int delayed, int duration, float dragRate, boolean animationOnly)` | Display refresh animation, Multifunction.
    `boolean` | `autoLoadMore()` | Display load more animation and trigger load more event.
    `boolean` | `autoLoadMore(int delayed)` | Display load more animation and trigger load more event, Delayed start.
    `boolean` | `autoLoadMoreAnimationOnly()` | Display load more animation without triggering events.
    `boolean` | `autoLoadMore(int delayed, int duration, float dragRate, boolean animationOnly)` | Display load more animation and trigger load more event, Delayed start.
    `static void` | `setDefaultRefreshHeaderCreator(DefaultRefreshHeaderCreator creator)` | 设置默认 Header 构建器
    `static void` | `setDefaultRefreshFooterCreator(DefaultRefreshFooterCreator creator)` | 设置默认 Footer 构建器
    `static void` | `setDefaultRefreshInitializer(DefaultRefreshInitializer initializer)` | 设置默认 Refresh 初始化器
    `boolean` | `isRefreshing()` | 是否正在刷新
    `boolean` | `isLoading()` | 是否正在加载
    `boolean` | `performClick()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SmartRefreshLayout

          SmartRefreshLayout(Context context)

    - #### SmartRefreshLayout

          SmartRefreshLayout(Context context, AttributeSet attrs)

  - ### Method Detail

    - #### computeScroll

           void computeScroll()

      重写 computeScroll 来完成 smart 的特定功能 1.越界回弹 2.边界碰撞

    - #### dispatchTouchEvent

           boolean dispatchTouchEvent(MotionEvent e)

      事件分发 （手势核心） 1.多点触摸 2.无缝衔接内容滚动

      Parameters:
        `e` - 事件

    - #### requestDisallowInterceptTouchEvent

           void requestDisallowInterceptTouchEvent(boolean disallowIntercept)

      这段代码来自谷歌官方的 SwipeRefreshLayout 主要是为了让老版本的 ListView 能平滑的下拉 而选择性的屏蔽 requestDisallowInterceptTouchEvent 应用场景已经在英文注释中解释清楚，大部分第三方下拉刷新库都保留了这段代码，本库也不例外

    - #### generateLayoutParams

           LayoutParams generateLayoutParams(AttributeSet attrs)

    - #### getNestedScrollAxes

           int getNestedScrollAxes()

    - #### onStartNestedScroll

           boolean onStartNestedScroll(View child, View target, int nestedScrollAxes)

    - #### onNestedScrollAccepted

           void onNestedScrollAccepted(View child, View target, int axes)

    - #### onNestedPreScroll

           void onNestedPreScroll(View target, int dx, int dy, Array<int> consumed)

    - #### onNestedScroll

           void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed)

    - #### onNestedPreFling

           boolean onNestedPreFling(View target, float velocityX, float velocityY)

    - #### onNestedFling

           boolean onNestedFling(View target, float velocityX, float velocityY, boolean consumed)

    - #### onStopNestedScroll

           void onStopNestedScroll(View target)

    - #### setNestedScrollingEnabled

           void setNestedScrollingEnabled(boolean enabled)

    - #### isNestedScrollingEnabled

           boolean isNestedScrollingEnabled()

    - #### setHeaderHeight

           RefreshLayout setHeaderHeight(float heightDp)

      Set the Header's height. 设置 Header 高度

      Parameters:
        `heightDp` - Density-independent Pixels 虚拟像素（px需要调用px2dp转换）
      Returns:

        RefreshLayout

    - #### setHeaderHeightPx

           RefreshLayout setHeaderHeightPx(int height)

      设置 Header 高度

      Parameters:
        `height` - 像素
      Returns:

        RefreshLayout

    - #### setFooterHeight

           RefreshLayout setFooterHeight(float heightDp)

      Set the Footer's height. 设置 Footer 的高度

      Parameters:
        `heightDp` - Density-independent Pixels 虚拟像素（px需要调用px2dp转换）
      Returns:

        RefreshLayout

    - #### setFooterHeightPx

           RefreshLayout setFooterHeightPx(int height)

      设置 Footer 高度

      Parameters:
        `height` - 像素
      Returns:

        RefreshLayout

    - #### setHeaderInsetStart

           RefreshLayout setHeaderInsetStart(float insetDp)

      Set the Header's start offset（see srlHeaderInsetStart in the RepastPracticeActivity XML in demo-app for the practical application）. 设置 Header 的起始偏移量（使用方法参考 demo-app 中的 RepastPracticeActivity xml 中的 srlHeaderInsetStart）

      Parameters:
        `insetDp` - Density-independent Pixels 虚拟像素（px需要调用px2dp转换）
      Returns:

        RefreshLayout

    - #### setHeaderInsetStartPx

           RefreshLayout setHeaderInsetStartPx(int insetPx)

      Set the Header's start offset（see srlHeaderInsetStart in the RepastPracticeActivity XML in demo-app for the practical application）. 设置 Header 起始偏移量（使用方法参考 demo-app 中的 RepastPracticeActivity xml 中的 srlHeaderInsetStart）

      Parameters:
        `insetPx` - 像素
      Returns:

        RefreshLayout

    - #### setFooterInsetStart

           RefreshLayout setFooterInsetStart(float insetDp)

      Set the Footer's start offset. 设置 Footer 起始偏移量（用户和 setHeaderInsetStart 一样）

      Parameters:
        `insetDp` - Density-independent Pixels 虚拟像素（px需要调用px2dp转换）
      Returns:

        RefreshLayout

    - #### setFooterInsetStartPx

           RefreshLayout setFooterInsetStartPx(int insetPx)

      Set the Footer's start offset. 设置 Footer 起始偏移量（用处和 setHeaderInsetStartPx 一样）

      Parameters:
        `insetPx` - 像素
      Returns:

        RefreshLayout

    - #### setDragRate

           RefreshLayout setDragRate(float rate)

      Set the damping effect. 显示拖动高度/真实拖动高度 比率（默认0.5，阻尼效果）

      Parameters:
        `rate` - ratio = (The drag height of the view)/(The actual drag height of the finger) 比率 = 视图拖动高度 / 手指拖动高度
      Returns:

        RefreshLayout

    - #### setHeaderMaxDragRate

           RefreshLayout setHeaderMaxDragRate(float rate)

      Set the ratio of the maximum height to drag header. 设置下拉最大高度和Header高度的比率（将会影响可以下拉的最大高度）

      Parameters:
        `rate` - ratio = (the maximum height to drag header)/(the height of header) 比率 = 下拉最大高度 / Header的高度
      Returns:

        RefreshLayout

    - #### setFooterMaxDragRate

           RefreshLayout setFooterMaxDragRate(float rate)

      Set the ratio of the maximum height to drag footer. 设置上拉最大高度和Footer高度的比率（将会影响可以上拉的最大高度）

      Parameters:
        `rate` - ratio = (the maximum height to drag footer)/(the height of footer) 比率 = 下拉最大高度 / Footer的高度
      Returns:

        RefreshLayout

    - #### setHeaderTriggerRate

           RefreshLayout setHeaderTriggerRate(float rate)

      Set the ratio at which the refresh is triggered. 设置 触发刷新距离 与 HeaderHeight 的比率

      Parameters:
        `rate` - 触发刷新距离 与 HeaderHeight 的比率
      Returns:

        RefreshLayout

    - #### setFooterTriggerRate

           RefreshLayout setFooterTriggerRate(float rate)

      Set the ratio at which the load more is triggered. 设置 触发加载距离 与 FooterHeight 的比率

      Parameters:
        `rate` - 触发加载距离 与 FooterHeight 的比率
      Returns:

        RefreshLayout

    - #### setReboundInterpolator

           RefreshLayout setReboundInterpolator(Interpolator interpolator)

      Set the rebound interpolator. 设置回弹显示插值器 [放手时回弹动画,结束时收缩动画]

      Parameters:
        `interpolator` - 动画插值器
      Returns:

        RefreshLayout

    - #### setReboundDuration

           RefreshLayout setReboundDuration(int duration)

      Set the duration of the rebound animation. 设置回弹动画时长 [放手时回弹动画,结束时收缩动画]

      Parameters:
        `duration` - 时长
      Returns:

        RefreshLayout

    - #### setEnableLoadMore

           RefreshLayout setEnableLoadMore(boolean enabled)

      Set whether to enable pull-up loading more (enabled by default). 设置是否启用上拉加载更多（默认启用）

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableRefresh

           RefreshLayout setEnableRefresh(boolean enabled)

      是否启用下拉刷新（默认启用）

      Parameters:
        `enabled` - 是否启用
      Returns:

        SmartRefreshLayout

    - #### setEnableHeaderTranslationContent

           RefreshLayout setEnableHeaderTranslationContent(boolean enabled)

      Whether to enable pull-down refresh (enabled by default). 是否启用下拉刷新（默认启用）

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableFooterTranslationContent

           RefreshLayout setEnableFooterTranslationContent(boolean enabled)

      Set whether to pull up the content while pulling up the header. 设置是否启在上拉 Footer 的同时上拉内容

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableAutoLoadMore

           RefreshLayout setEnableAutoLoadMore(boolean enabled)

      Sets whether to listen for the list to trigger a load event when scrolling to the bottom (default true). 设置是否监听列表在滚动到底部时触发加载事件（默认true）

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableOverScrollBounce

           RefreshLayout setEnableOverScrollBounce(boolean enabled)

      Set whether to enable cross-border rebound function. 设置是否启用越界回弹

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnablePureScrollMode

           RefreshLayout setEnablePureScrollMode(boolean enabled)

      Set whether to enable the pure scroll mode. 设置是否开启纯滚动模式

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableScrollContentWhenLoaded

           RefreshLayout setEnableScrollContentWhenLoaded(boolean enabled)

      Set whether to scroll the content to display new data after loading more complete. 设置是否在加载更多完成之后滚动内容显示新数据

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableScrollContentWhenRefreshed

           RefreshLayout setEnableScrollContentWhenRefreshed(boolean enabled)

      Set whether to scroll the content to display new data after the refresh is complete. 是否在刷新完成之后滚动内容显示新数据

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableLoadMoreWhenContentNotFull

           RefreshLayout setEnableLoadMoreWhenContentNotFull(boolean enabled)

      Set whether to pull up and load more when the content is not full of one page. 设置在内容不满一页的时候，是否可以上拉加载更多

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableOverScrollDrag

           RefreshLayout setEnableOverScrollDrag(boolean enabled)

      Set whether to enable cross-border drag (imitation iphone effect). 设置是否启用越界拖动（仿苹果效果）

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableFooterFollowWhenNoMoreData

           RefreshLayout setEnableFooterFollowWhenNoMoreData(boolean enabled)

      Set whether or not Footer follows the content after there is no more data. 设置是否在没有更多数据之后 Footer 跟随内容

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableClipHeaderWhenFixedBehind

           RefreshLayout setEnableClipHeaderWhenFixedBehind(boolean enabled)

      Set whether to clip header when the Header is in the FixedBehind state. 设置是否在当 Header 处于 FixedBehind 状态的时候剪裁遮挡 Header

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableClipFooterWhenFixedBehind

           RefreshLayout setEnableClipFooterWhenFixedBehind(boolean enabled)

      Set whether to clip footer when the Footer is in the FixedBehind state. 设置是否在当 Footer 处于 FixedBehind 状态的时候剪裁遮挡 Footer

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setEnableNestedScroll

           RefreshLayout setEnableNestedScroll(boolean enabled)

      Setting whether nesting scrolling is enabled (default off + smart on). 设置是会否启用嵌套滚动功能（默认关闭+智能开启）

      Parameters:
        `enabled` - 是否启用
      Returns:

        RefreshLayout

    - #### setFixedHeaderViewId

           RefreshLayout setFixedHeaderViewId(int id)

      设置固定在 Header 下方的视图Id，可以在 Footer 上下滚动的时候保持不跟谁滚动

      Parameters:
        `id` - 固定在头部的视图Id
      Returns:

        RefreshLayout

    - #### setFixedFooterViewId

           RefreshLayout setFixedFooterViewId(int id)

      设置固定在 Footer 上方的视图Id，可以在 Header 上下滚动的时候保持不跟谁滚动

      Parameters:
        `id` - 固定在底部的视图Id
      Returns:

        RefreshLayout

    - #### setHeaderTranslationViewId

           RefreshLayout setHeaderTranslationViewId(int id)

      设置在 Header 上下滚动时，需要跟随滚动的视图Id，默认整个内容视图

      Parameters:
        `id` - 固定在头部的视图Id
      Returns:

        RefreshLayout

    - #### setFooterTranslationViewId

           RefreshLayout setFooterTranslationViewId(int id)

      设置在 Footer 上下滚动时，需要跟随滚动的视图Id，默认整个内容视图

      Parameters:
        `id` - 固定在头部的视图Id
      Returns:

        RefreshLayout

    - #### setDisableContentWhenRefresh

           RefreshLayout setDisableContentWhenRefresh(boolean disable)

      Set whether to enable the action content view when refreshing. 设置是否开启在刷新时候禁止操作内容视图

      Parameters:
        `disable` - 是否禁止
      Returns:

        RefreshLayout

    - #### setDisableContentWhenLoading

           RefreshLayout setDisableContentWhenLoading(boolean disable)

      Set whether to enable the action content view when loading. 设置是否开启在加载时候禁止操作内容视图

      Parameters:
        `disable` - 是否禁止
      Returns:

        RefreshLayout

    - #### setRefreshHeader

           RefreshLayout setRefreshHeader(RefreshHeader header)

      Set the header of RefreshLayout. 设置指定的 Header

      Parameters:
        `header` - RefreshHeader 刷新头
      Returns:

        RefreshLayout

    - #### setRefreshHeader

           RefreshLayout setRefreshHeader(RefreshHeader header, int width, int height)

      Set the header of RefreshLayout. 设置指定的 Header

      Parameters:
        `header` - RefreshHeader 刷新头
        `width` - the width in px, can use MATCH_PARENT and WRAP_CONTENT.
        `height` - the height in px, can use MATCH_PARENT and WRAP_CONTENT.
      Returns:

        RefreshLayout

    - #### setRefreshFooter

           RefreshLayout setRefreshFooter(RefreshFooter footer)

      Set the footer of RefreshLayout. 设置指定的 Footer

      Parameters:
        `footer` - RefreshFooter 刷新尾巴
      Returns:

        RefreshLayout

    - #### setRefreshFooter

           RefreshLayout setRefreshFooter(RefreshFooter footer, int width, int height)

      Set the footer of RefreshLayout. 设置指定的 Footer

      Parameters:
        `footer` - RefreshFooter 刷新尾巴
        `width` - the width in px, can use MATCH_PARENT and WRAP_CONTENT.
        `height` - the height in px, can use MATCH_PARENT and WRAP_CONTENT.
      Returns:

        RefreshLayout

    - #### setRefreshContent

           RefreshLayout setRefreshContent(View content)

      Set the content of RefreshLayout（Suitable for non-XML pages, not suitable for replacing empty layouts）。 设置指定的 Content（适用于非XML页面，不适合用替换空布局）

      Parameters:
        `content` - View 内容视图
      Returns:

        RefreshLayout

    - #### setRefreshContent

           RefreshLayout setRefreshContent(View content, int width, int height)

      Set the content of RefreshLayout（Suitable for non-XML pages, not suitable for replacing empty layouts）. 设置指定的 Content（适用于非XML页面，不适合用替换空布局）

      Parameters:
        `content` - View 内容视图
        `width` - the width in px, can use MATCH_PARENT and WRAP_CONTENT.
        `height` - the height in px, can use MATCH_PARENT and WRAP_CONTENT.
      Returns:

        RefreshLayout

    - #### getRefreshFooter

           RefreshFooter getRefreshFooter()

      Get footer of RefreshLayout 获取当前 Footer

      Returns:

        RefreshLayout

    - #### getRefreshHeader

           RefreshHeader getRefreshHeader()

      Get header of RefreshLayout 获取当前 Header

      Returns:

        RefreshLayout

    - #### getState

           RefreshState getState()

      Get the current state of RefreshLayout 获取当前状态

      Returns:

        RefreshLayout

    - #### getLayout

           ViewGroup getLayout()

      Get the ViewGroup of RefreshLayout 获取实体布局视图

      Returns:

        ViewGroup

    - #### setOnRefreshListener

           RefreshLayout setOnRefreshListener(OnRefreshListener listener)

      Set refresh listener separately. 单独设置刷新监听器

      Parameters:
        `listener` - OnRefreshListener 刷新监听器
      Returns:

        RefreshLayout

    - #### setOnLoadMoreListener

           RefreshLayout setOnLoadMoreListener(OnLoadMoreListener listener)

      Set load more listener separately. 单独设置加载监听器

      Parameters:
        `listener` - OnLoadMoreListener 加载监听器
      Returns:

        RefreshLayout

    - #### setOnRefreshLoadMoreListener

           RefreshLayout setOnRefreshLoadMoreListener(OnRefreshLoadMoreListener listener)

      Set refresh and load listeners at the same time. 同时设置刷新和加载监听器

      Parameters:
        `listener` - OnRefreshLoadMoreListener 刷新加载监听器
      Returns:

        RefreshLayout

    - #### setOnMultiListener

           RefreshLayout setOnMultiListener(OnMultiListener listener)

      Set up a multi-function listener. Recommended SimpleBoundaryDecider 设置滚动边界判断器 建议使用 SimpleBoundaryDecider

      Parameters:
        `listener` - OnMultiListener 多功能监听器
      Returns:

        RefreshLayout

    - #### setPrimaryColors

           RefreshLayout setPrimaryColors(Array<int> primaryColors)

      Set theme color int (primaryColor and accentColor). 设置主题颜色

      Parameters:
        `primaryColors` - ColorInt 主题颜色
      Returns:

        RefreshLayout

    - #### setPrimaryColorsId

           RefreshLayout setPrimaryColorsId(Array<int> primaryColorId)

      Set theme color id (primaryColor and accentColor). 设置主题颜色

      Parameters:
        `primaryColorId` - ColorRes 主题颜色ID
      Returns:

        RefreshLayout

    - #### setScrollBoundaryDecider

           RefreshLayout setScrollBoundaryDecider(ScrollBoundaryDecider boundary)

      Set the scroll boundary Decider, Can customize when you can refresh. Recommended 设置滚动边界判断器 建议使用 SimpleBoundaryDecider

      Parameters:
        `boundary` - ScrollBoundaryDecider 判断器
      Returns:

        RefreshLayout

    - #### setNoMoreData

           RefreshLayout setNoMoreData(boolean noMoreData)

      Restore the original state after finishLoadMoreWithNoMoreData. 恢复没有更多数据的原始状态

      Parameters:
        `noMoreData` - 是否有更多数据
      Returns:

        RefreshLayout

    - #### resetNoMoreData

           RefreshLayout resetNoMoreData()

      Restore the original state after finishLoadMoreWithNoMoreData. 恢复没有更多数据的原始状态

      Returns:

        RefreshLayout

    - #### finishRefresh

           RefreshLayout finishRefresh()

      finish refresh. 完成刷新

      Returns:

        RefreshLayout

    - #### finishLoadMore

           RefreshLayout finishLoadMore()

      finish load more. 完成加载

      Returns:

        RefreshLayout

    - #### finishRefresh

           RefreshLayout finishRefresh(int delayed)

      finish refresh. 完成刷新

      Parameters:
        `delayed` - 开始延时
      Returns:

        RefreshLayout

    - #### finishRefresh

           RefreshLayout finishRefresh(boolean success)

      finish refresh. 完成加载

      Parameters:
        `success` - 数据是否成功刷新 （会影响到上次更新时间的改变）
      Returns:

        RefreshLayout

    - #### finishRefresh

           RefreshLayout finishRefresh(int delayed, boolean success, Boolean noMoreData)

      finish refresh. 完成刷新

      Parameters:
        `delayed` - 开始延时
        `success` - 数据是否成功刷新 （会影响到上次更新时间的改变）
      Returns:

        RefreshLayout

    - #### finishRefreshWithNoMoreData

           RefreshLayout finishRefreshWithNoMoreData()

      finish load more with no more data. 完成刷新并标记没有更多数据

      Returns:

        RefreshLayout

    - #### finishLoadMore

           RefreshLayout finishLoadMore(int delayed)

      finish load more. 完成加载

      Parameters:
        `delayed` - 开始延时
      Returns:

        RefreshLayout

    - #### finishLoadMore

           RefreshLayout finishLoadMore(boolean success)

      finish load more. 完成加载

      Parameters:
        `success` - 数据是否成功
      Returns:

        RefreshLayout

    - #### finishLoadMore

           RefreshLayout finishLoadMore(int delayed, boolean success, boolean noMoreData)

      finish load more. 完成加载

      Parameters:
        `delayed` - 开始延时
        `success` - 数据是否成功
        `noMoreData` - 是否有更多数据
      Returns:

        RefreshLayout

    - #### finishLoadMoreWithNoMoreData

           RefreshLayout finishLoadMoreWithNoMoreData()

      finish load more with no more data. 完成加载并标记没有更多数据

      Returns:

        RefreshLayout

    - #### closeHeaderOrFooter

           RefreshLayout closeHeaderOrFooter()

      Close the Header or Footer, can't replace finishRefresh and finishLoadMore. 关闭 Header 或者 Footer 注意： 1.closeHeaderOrFooter 任何时候任何状态都能关闭 header 和 footer 2.finishRefresh 和 finishLoadMore 只能在 刷新 或者 加载 的时候关闭

      Returns:

        RefreshLayout

    - #### autoRefresh

           boolean autoRefresh()

      Display refresh animation and trigger refresh event. 显示刷新动画并且触发刷新事件

      Returns:

        true or false, Status non-compliance will fail. 是否成功（状态不符合会失败）

    - #### autoRefresh

           boolean autoRefresh(int delayed)

      Display refresh animation and trigger refresh event, Delayed start. 显示刷新动画并且触发刷新事件，延时启动

      Parameters:
        `delayed` - 开始延时
      Returns:

        true or false, Status non-compliance will fail. 是否成功（状态不符合会失败）

    - #### autoRefreshAnimationOnly

           boolean autoRefreshAnimationOnly()

      Display refresh animation without triggering events. 显示刷新动画，不触发事件

      Returns:

        true or false, Status non-compliance will fail. 是否成功（状态不符合会失败）

    - #### autoRefresh

           boolean autoRefresh(int delayed, int duration, float dragRate, boolean animationOnly)

      Display refresh animation, Multifunction. 显示刷新动画并且触发刷新事件

      Parameters:
        `delayed` - 开始延时
        `duration` - 拖拽动画持续时间
        `dragRate` - 拉拽的高度比率
        `animationOnly` - animation only 只有动画
      Returns:

        true or false, Status non-compliance will fail. 是否成功（状态不符合会失败）

    - #### autoLoadMore

           boolean autoLoadMore()

      Display load more animation and trigger load more event. 显示加载动画并且触发刷新事件

      Returns:

        true or false, Status non-compliance will fail. 是否成功（状态不符合会失败）

    - #### autoLoadMore

           boolean autoLoadMore(int delayed)

      Display load more animation and trigger load more event, Delayed start. 显示加载动画并且触发刷新事件, 延时启动

      Parameters:
        `delayed` - 开始延时
      Returns:

        true or false, Status non-compliance will fail. 是否成功（状态不符合会失败）

    - #### autoLoadMoreAnimationOnly

           boolean autoLoadMoreAnimationOnly()

      Display load more animation without triggering events. 显示加载动画，不触发事件

      Returns:

        true or false, Status non-compliance will fail. 是否成功（状态不符合会失败）

    - #### autoLoadMore

           boolean autoLoadMore(int delayed, int duration, float dragRate, boolean animationOnly)

      Display load more animation and trigger load more event, Delayed start. 显示加载动画, 多功能选项

      Parameters:
        `delayed` - 开始延时
        `duration` - 拖拽动画持续时间
        `dragRate` - 拉拽的高度比率
      Returns:

        true or false, Status non-compliance will fail. 是否成功（状态不符合会失败）

    - #### setDefaultRefreshHeaderCreator

           static void setDefaultRefreshHeaderCreator(DefaultRefreshHeaderCreator creator)

      设置默认 Header 构建器

      Parameters:
        `creator` - Header构建器

    - #### setDefaultRefreshFooterCreator

           static void setDefaultRefreshFooterCreator(DefaultRefreshFooterCreator creator)

      设置默认 Footer 构建器

      Parameters:
        `creator` - Footer构建器

    - #### setDefaultRefreshInitializer

           static void setDefaultRefreshInitializer(DefaultRefreshInitializer initializer)

      设置默认 Refresh 初始化器

      Parameters:
        `initializer` - 全局初始化器

    - #### isRefreshing

           boolean isRefreshing()

      是否正在刷新

      Returns:

        是否正在刷新

    - #### isLoading

           boolean isLoading()

      是否正在加载

      Returns:

        是否正在加载

    - #### performClick

           boolean performClick()