public abstract class VerticalScrollingBehavior<V extends android.view.View>
extends <any>
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
VerticalScrollingBehavior.ScrollDirection |
| 构造器和说明 |
|---|
VerticalScrollingBehavior() |
VerticalScrollingBehavior(android.content.Context context,
android.util.AttributeSet attrs) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getConsumedScrollDirection() |
int |
getPreScrollDirection() |
int |
getScrollDirection() |
protected abstract boolean |
onNestedDirectionFling(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
float velocityX,
float velocityY,
boolean consumed,
int scrollDirection) |
boolean |
onNestedFling(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
float velocityX,
float velocityY,
boolean consumed) |
void |
onNestedPreScroll(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
int dx,
int dy,
int[] consumed) |
void |
onNestedScroll(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
int dxConsumed,
int dyConsumed,
int dxUnconsumed,
int dyUnconsumed) |
abstract void |
onNestedVerticalPreScroll(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
int dx,
int dy,
int[] consumed,
int scrollDirection) |
abstract void |
onNestedVerticalScrollConsumed(CoordinatorLayout coordinatorLayout,
V child,
int scrollDirection,
int currentOverScroll,
int totalConsumedScroll) |
abstract void |
onNestedVerticalScrollUnconsumed(CoordinatorLayout coordinatorLayout,
V child,
int scrollDirection,
int currentOverScroll,
int totalScroll) |
boolean |
onStartNestedScroll(CoordinatorLayout coordinatorLayout,
V child,
android.view.View directTargetChild,
android.view.View target,
int nestedScrollAxes) |
public VerticalScrollingBehavior(android.content.Context context,
android.util.AttributeSet attrs)
public VerticalScrollingBehavior()
public int getScrollDirection()
public int getConsumedScrollDirection()
public int getPreScrollDirection()
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout,
V child,
android.view.View directTargetChild,
android.view.View target,
int nestedScrollAxes)
public void onNestedScroll(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
int dxConsumed,
int dyConsumed,
int dxUnconsumed,
int dyUnconsumed)
public void onNestedPreScroll(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
int dx,
int dy,
int[] consumed)
public boolean onNestedFling(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
float velocityX,
float velocityY,
boolean consumed)
public abstract void onNestedVerticalScrollUnconsumed(CoordinatorLayout coordinatorLayout,
V child,
int scrollDirection,
int currentOverScroll,
int totalScroll)
coordinatorLayout - the CoordinatorLayout parent of the view this Behavior is associated withchild - the child view of the CoordinatorLayout this Behavior is associated withscrollDirection - Direction of the scroll: SCROLL_DIRECTION_UP, SCROLL_DIRECTION_DOWNcurrentOverScroll - Unconsumed value, negative or positive based on the direction;totalScroll - Cumulative value for current direction (Unconsumed)public abstract void onNestedVerticalScrollConsumed(CoordinatorLayout coordinatorLayout,
V child,
int scrollDirection,
int currentOverScroll,
int totalConsumedScroll)
coordinatorLayout - the CoordinatorLayout parent of the view this Behavior is associated withchild - the child view of the CoordinatorLayout this Behavior is associated withscrollDirection - Direction of the scroll: SCROLL_DIRECTION_UP, SCROLL_DIRECTION_DOWNcurrentOverScroll - Unconsumed value, negative or positive based on the direction;totalConsumedScroll - Cumulative value for current direction (Unconsumed)public abstract void onNestedVerticalPreScroll(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
int dx,
int dy,
int[] consumed,
int scrollDirection)
coordinatorLayout - the CoordinatorLayout parent of the view this Behavior is associated withchild - the child view of the CoordinatorLayout this Behavior is associated withtarget - the descendant view of the CoordinatorLayout performing the nested scrolldx - the raw horizontal number of pixels that the user attempted to scrolldy - the raw vertical number of pixels that the user attempted to scrollconsumed - out parameter. consumed[0] should be set to the distance of dx that was consumed, consumed[1] should be set to the distance of dy that was consumedscrollDirection - Direction of the scroll: SCROLL_DIRECTION_UP, SCROLL_DIRECTION_DOWNprotected abstract boolean onNestedDirectionFling(CoordinatorLayout coordinatorLayout,
V child,
android.view.View target,
float velocityX,
float velocityY,
boolean consumed,
int scrollDirection)
coordinatorLayout - the CoordinatorLayout parent of the view this Behavior is associated withchild - the child view of the CoordinatorLayout this Behavior is associated withtarget - the descendant view of the CoordinatorLayout performing the nested scrollvelocityX - horizontal velocity of the attempted flingvelocityY - vertical velocity of the attempted flingconsumed - true if the nested child view consumed the flingscrollDirection - Direction of the scroll: SCROLL_DIRECTION_UP, SCROLL_DIRECTION_DOWN