public class SmartRefreshLayout.RefreshKernelImpl extends java.lang.Object implements RefreshKernel
Constructor and Description |
---|
RefreshKernelImpl() |
Modifier and Type | Method and Description |
---|---|
android.animation.ValueAnimator |
animSpinner(int endSpinner)
执行动画使视图位移到指定的 位置
moveSpinner 的取名来自 谷歌官方的
android.support.v4.widget.SwipeRefreshLayout |
RefreshKernel |
finishTwoLevel()
结束关闭二极刷新
|
RefreshContent |
getRefreshContent() |
RefreshLayout |
getRefreshLayout() |
RefreshKernel |
moveSpinner(int spinner,
boolean isDragging)
移动滚动 Scroll
moveSpinner 的取名来自 谷歌官方的 { android.support.v4.widget.SwipeRefreshLayout#moveSpinner(float)}
moveSpinner The name comes from { android.support.v4.widget.SwipeRefreshLayout#moveSpinner(float)}
|
RefreshKernel |
requestDefaultTranslationContentFor(RefreshComponent internal,
boolean translation)
请求设置默认内容滚动设置
|
RefreshKernel |
requestDrawBackgroundFor(RefreshComponent internal,
int backgroundColor)
指定在下拉时候为 Header 或 Footer 绘制背景
|
RefreshKernel |
requestFloorBottomPullUpToCloseRate(float rate)
设置二楼底部上划关闭所占高度的比率
|
RefreshKernel |
requestFloorDuration(int duration)
设置二楼回弹时长
|
RefreshKernel |
requestNeedTouchEventFor(RefreshComponent internal,
boolean request)
请求事件
|
RefreshKernel |
requestRemeasureHeightFor(RefreshComponent internal)
请求重新测量 headerHeight 或 footerHeight , 要求 height 高度为 WRAP_CONTENT
|
RefreshKernel |
setState(RefreshState state) |
RefreshKernel |
startTwoLevel(boolean open)
开始执行二极刷新
|
public RefreshLayout getRefreshLayout()
getRefreshLayout
in interface RefreshKernel
public RefreshContent getRefreshContent()
getRefreshContent
in interface RefreshKernel
public RefreshKernel setState(RefreshState state)
setState
in interface RefreshKernel
public RefreshKernel startTwoLevel(boolean open)
RefreshKernel
startTwoLevel
in interface RefreshKernel
open
- 是否展开public RefreshKernel finishTwoLevel()
RefreshKernel
finishTwoLevel
in interface RefreshKernel
public RefreshKernel moveSpinner(int spinner, boolean isDragging)
moveSpinner
in interface RefreshKernel
spinner
- 新的 spinnerisDragging
- 是否是拖动产生的滚动
只有,finishRefresh,finishLoadMore,overSpinner 的回弹动画才会是 false
dispatchTouchEvent , nestScroll 等都为 true
autoRefresh,autoLoadMore,需要模拟拖动,也为 truepublic android.animation.ValueAnimator animSpinner(int endSpinner)
RefreshKernel
android.support.v4.widget.SwipeRefreshLayout
animSpinner
in interface RefreshKernel
endSpinner
- 指定的结束位置 (px)public RefreshKernel requestDrawBackgroundFor(RefreshComponent internal, int backgroundColor)
RefreshKernel
requestDrawBackgroundFor
in interface RefreshKernel
internal
- Header Footer 调用时传 thisbackgroundColor
- 背景颜色public RefreshKernel requestNeedTouchEventFor(RefreshComponent internal, boolean request)
RefreshKernel
requestNeedTouchEventFor
in interface RefreshKernel
internal
- Header Footer 调用时传 thisrequest
- 请求public RefreshKernel requestDefaultTranslationContentFor(RefreshComponent internal, boolean translation)
RefreshKernel
requestDefaultTranslationContentFor
in interface RefreshKernel
internal
- Header Footer 调用时传 thistranslation
- 移动public RefreshKernel requestRemeasureHeightFor(RefreshComponent internal)
RefreshKernel
requestRemeasureHeightFor
in interface RefreshKernel
internal
- Header Footer 调用时传 thispublic RefreshKernel requestFloorDuration(int duration)
RefreshKernel
requestFloorDuration
in interface RefreshKernel
duration
- 二楼回弹时长public RefreshKernel requestFloorBottomPullUpToCloseRate(float rate)
RefreshKernel
requestFloorBottomPullUpToCloseRate
in interface RefreshKernel