本文整理汇总了Java中android.support.v4.view.ViewCompat.SCROLL_AXIS_HORIZONTAL属性的典型用法代码示例。如果您正苦于以下问题:Java ViewCompat.SCROLL_AXIS_HORIZONTAL属性的具体用法?Java ViewCompat.SCROLL_AXIS_HORIZONTAL怎么用?Java ViewCompat.SCROLL_AXIS_HORIZONTAL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.support.v4.view.ViewCompat
的用法示例。
在下文中一共展示了ViewCompat.SCROLL_AXIS_HORIZONTAL属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: autoRefresh
public void autoRefresh(boolean scrollToEdgeUseSmoothScroll,
boolean atOnce,
boolean autoRefreshUseSmoothScroll) {
if (mRefreshLayout != null) {
if (mStatus != SmoothRefreshLayout.SR_STATUS_INIT)
return;
if (mRefreshLayout.isChildNotYetInEdgeCannotMoveHeader()) {
if (mRefreshLayout.getSupportScrollAxis() == ViewCompat.SCROLL_AXIS_VERTICAL) {
verticalScrollToEdge(true, scrollToEdgeUseSmoothScroll);
} else if (mRefreshLayout.getSupportScrollAxis() == ViewCompat
.SCROLL_AXIS_HORIZONTAL) {
horizontalScrollToEdge(true, scrollToEdgeUseSmoothScroll);
}
mNeedToTriggerRefresh = true;
mCachedActionAtOnce = atOnce;
mCachedAutoRefreshUseSmoothScroll = autoRefreshUseSmoothScroll;
} else {
mRefreshLayout.autoRefresh(atOnce, autoRefreshUseSmoothScroll);
mNeedToTriggerRefresh = false;
mCachedActionAtOnce = false;
mCachedAutoRefreshUseSmoothScroll = false;
}
}
}
示例2: autoLoadMore
public void autoLoadMore(boolean scrollToEdgeUseSmoothScroll,
boolean atOnce,
boolean autoRefreshUseSmoothScroll) {
if (mRefreshLayout != null) {
if (mStatus != SmoothRefreshLayout.SR_STATUS_INIT)
return;
if (mRefreshLayout.isChildNotYetInEdgeCannotMoveFooter()) {
if (mRefreshLayout.getSupportScrollAxis() == ViewCompat.SCROLL_AXIS_VERTICAL) {
verticalScrollToEdge(false, scrollToEdgeUseSmoothScroll);
} else if (mRefreshLayout.getSupportScrollAxis() == ViewCompat
.SCROLL_AXIS_HORIZONTAL) {
horizontalScrollToEdge(false, scrollToEdgeUseSmoothScroll);
}
mNeedToTriggerLoadMore = true;
mCachedActionAtOnce = atOnce;
mCachedAutoRefreshUseSmoothScroll = autoRefreshUseSmoothScroll;
} else {
mRefreshLayout.autoLoadMore(atOnce, autoRefreshUseSmoothScroll);
mNeedToTriggerLoadMore = false;
mCachedActionAtOnce = false;
mCachedAutoRefreshUseSmoothScroll = false;
}
}
}
示例3: onStartNestedScroll
@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, StretchView child, View directTargetChild, View target, int nestedScrollAxes) {
final int direction = child.getDirection();
boolean start = ((direction == StretchView.LEFT || direction == StretchView.RIGHT)
&& (nestedScrollAxes & ViewCompat.SCROLL_AXIS_HORIZONTAL) != 0 &&
coordinatorLayout.getWidth() - directTargetChild.getWidth() <= child.getWidth()) ||
(direction == StretchView.BOTTOM && (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0 &&
coordinatorLayout.getHeight() - directTargetChild.getHeight() <= child.getHeight());
if (start && mTransAnimator != null) {
mTransAnimator.cancel();
}
return start;
}
示例4: getSupportScrollAxis
@Override
final public int getSupportScrollAxis() {
return ViewCompat.SCROLL_AXIS_HORIZONTAL;
}