当前位置: 首页>>代码示例>>Java>>正文


Java ViewCompat.SCROLL_AXIS_HORIZONTAL属性代码示例

本文整理汇总了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;
        }
    }
}
 
开发者ID:dkzwm,项目名称:SmoothRefreshLayout,代码行数:24,代码来源:QuickConfigAutoRefreshUtil.java

示例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;
        }
    }
}
 
开发者ID:dkzwm,项目名称:SmoothRefreshLayout,代码行数:24,代码来源:QuickConfigAutoRefreshUtil.java

示例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;
}
 
开发者ID:thunderpunch,项目名称:StretchView,代码行数:13,代码来源:StretchView.java

示例4: getSupportScrollAxis

@Override
final public int getSupportScrollAxis() {
    return ViewCompat.SCROLL_AXIS_HORIZONTAL;
}
 
开发者ID:dkzwm,项目名称:SmoothRefreshLayout,代码行数:4,代码来源:HorizontalSmoothRefreshLayout.java


注:本文中的android.support.v4.view.ViewCompat.SCROLL_AXIS_HORIZONTAL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。