public class RefreshHeaderBehavior<V extends android.view.View> extends VerticalIndicatorBehavior<V,HeaderBehaviorController> implements Refresher
RefreshContentBehavior, otherwise it'll not work.
The view to which this behavior is attached must be a direct child of CoordinatorLayout.
AnimationOffsetBehavior.ScrollingListenerconfiguration, controller, GOLDEN_RATIO, handler, mChild, mListeners, mParent, progressBase, TYPE_UNKNOWN| Constructor and Description |
|---|
RefreshHeaderBehavior(android.content.Context context) |
RefreshHeaderBehavior(android.content.Context context,
android.util.AttributeSet attrs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOnRefreshListener(OnRefreshListener listener) |
void |
addOnScrollListener(OnScrollListener listener) |
HeaderBehaviorController |
getController() |
protected int |
getInitialOffset(CoordinatorLayout parent,
android.view.View child) |
protected int |
getMaxOffset(CoordinatorLayout parent,
android.view.View child) |
protected int |
getMinOffset(CoordinatorLayout parent,
android.view.View child) |
protected int |
getRefreshTriggerOffset(CoordinatorLayout parent,
android.view.View child) |
boolean |
onLayoutChild(CoordinatorLayout parent,
V child,
int layoutDirection) |
void |
refresh()
Start a refreshing.
|
void |
refreshComplete()
Refreshing complete, which will reset the header behavior's refreshing state.
|
void |
refreshError(java.lang.Throwable throwable)
The same as
Refresher.refreshComplete(), in addition it can report exceptions to the
refreshing listeners. |
getContentBehavior, layoutDependsOn, onDependentViewChanged, onMeasureChild, onStartNestedScroll, onStopNestedScrolladdScrollListener, animateOffsetDeltaWithDuration, animateOffsetWithDuration, cancelAnimation, enqueuePendingActions, executePendingActions, getChild, getConfiguration, getParent, handleMessage, onAttachedToLayoutParams, onDetachedFromLayoutParams, removeScrollListener, requestLayout, runOnUiThread, runWithView, setConfigurationgetLeftAndRightOffset, getTopAndBottomOffset, layoutChild, setLeftAndRightOffset, setTopAndBottomOffsetpublic RefreshHeaderBehavior(android.content.Context context)
public RefreshHeaderBehavior(android.content.Context context,
android.util.AttributeSet attrs)
public boolean onLayoutChild(CoordinatorLayout parent,
V child,
int layoutDirection)
onLayoutChild in class VerticalIndicatorBehavior<V extends android.view.View,HeaderBehaviorController>public void addOnScrollListener(OnScrollListener listener)
public void addOnRefreshListener(OnRefreshListener listener)
public HeaderBehaviorController getController()
getController in class AnimationOffsetBehavior<V extends android.view.View,HeaderBehaviorController>public void refresh()
Refresherpublic void refreshComplete()
RefresherrefreshComplete in interface Refresherpublic void refreshError(java.lang.Throwable throwable)
RefresherRefresher.refreshComplete(), in addition it can report exceptions to the
refreshing listeners.refreshError in interface RefresherOnRefreshListener}protected int getInitialOffset(CoordinatorLayout parent,
android.view.View child)
getInitialOffset in class VerticalIndicatorBehavior<V extends android.view.View,HeaderBehaviorController>protected int getRefreshTriggerOffset(CoordinatorLayout parent,
android.view.View child)
getRefreshTriggerOffset in class VerticalIndicatorBehavior<V extends android.view.View,HeaderBehaviorController>protected int getMinOffset(CoordinatorLayout parent,
android.view.View child)
getMinOffset in class VerticalIndicatorBehavior<V extends android.view.View,HeaderBehaviorController>protected int getMaxOffset(CoordinatorLayout parent,
android.view.View child)
getMaxOffset in class VerticalIndicatorBehavior<V extends android.view.View,HeaderBehaviorController>