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


Java ViewCompat.SCROLL_AXIS_VERTICAL属性代码示例

本文整理汇总了Java中android.support.v4.view.ViewCompat.SCROLL_AXIS_VERTICAL属性的典型用法代码示例。如果您正苦于以下问题:Java ViewCompat.SCROLL_AXIS_VERTICAL属性的具体用法?Java ViewCompat.SCROLL_AXIS_VERTICAL怎么用?Java ViewCompat.SCROLL_AXIS_VERTICAL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.support.v4.view.ViewCompat的用法示例。


在下文中一共展示了ViewCompat.SCROLL_AXIS_VERTICAL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: onStartNestedScroll

@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child, View directTargetChild, View target, int nestedScrollAxes) {

    if (child.getVisibility() == View.VISIBLE && viewY == 0) {
        //获取控件距离父布局(coordinatorLayout)底部距离
        viewY = coordinatorLayout.getHeight() - child.getY();
    }

    return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0;//判断是否竖直滚动
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:MyFabBehavior.java

示例3: onStartNestedScroll

@Override
public boolean onStartNestedScroll(final CoordinatorLayout coordinatorLayout, final FloatingActionButton child, final View directTargetChild, final View target, final int nestedScrollAxes) {
    // Ensure we react to vertical scrolling
    return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL ||
        super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target,
            nestedScrollAxes);
}
 
开发者ID:drakeet,项目名称:rebase-android,代码行数:7,代码来源:ScrollAwareFABBehavior.java

示例4: onStartNestedScroll

@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child, View directTargetChild, View target, int nestedScrollAxes) {
    if (!isHided) {
        isHided = true;
        ViewCompat.setTranslationY(child, child.getHeight());
    }
    if (child.getVisibility() == View.VISIBLE && viewY == 0) {
        //获取控件距离父布局(coordinatorLayout)底部距离
        viewY = coordinatorLayout.getHeight() - child.getY();
    }
    return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0;//判断是否竖直滚动
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:MyCommentBehavior.java

示例5: onStartNestedScroll

@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child,
                                   View directTargetChild, View target, int nestedScrollAxes) {
    if (isInit) {
        mCommonAnim = new BottomBehaviorAnim(child);
        isInit = false;
    }
    return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0;
}
 
开发者ID:Zweihui,项目名称:Aurora,代码行数:9,代码来源:BottomBehavior.java

示例6: onStartNestedScroll

@Override
public boolean onStartNestedScroll(View child, View target, int nestedScrollAxes) {
    //只允许纵向嵌套滑动
    if (nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL) {
        return true;
    }
    return super.onStartNestedScroll(child, target, nestedScrollAxes);
}
 
开发者ID:halohoop,项目名称:AndroidDigIn,代码行数:8,代码来源:NestedScrollLayout.java

示例7: onStartNestedScroll

@Override
public boolean onStartNestedScroll(final CoordinatorLayout coordinatorLayout, final FloatingActionButton child,
                                   final View directTargetChild, final View target, final int nestedScrollAxes) {
    // Ensure we react to vertical scrolling
    return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL
            || super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, nestedScrollAxes);
}
 
开发者ID:LinweiJ,项目名称:MaterialDesignWidget,代码行数:7,代码来源:ScrollAwareFABBehaviorDefault.java

示例8: onStartNestedScroll

@Override
public boolean onStartNestedScroll(View child, View target, int axes, int type) {
    if (type == ViewCompat.TYPE_TOUCH) {
        return super.onStartNestedScroll(child, target, axes, type)
                || ((axes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0);
    }
    return super.onStartNestedScroll(child, target, axes, type);
}
 
开发者ID:kollerlukas,项目名称:Camera-Roll-Android-App,代码行数:8,代码来源:SwipeBackCoordinatorLayout.java

示例9: onStartNestedScroll

@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child, View directTargetChild, View target, int nestedScrollAxes) {
    if (BuildConfig.DEBUG) {
        Log.d(TAG, "onStartNestedScroll: ");
    }
    return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0 && canScroll(child, 0) && !isClosed(child);
}
 
开发者ID:Learzhu,项目名称:UcMainPagerDemo-master,代码行数:7,代码来源:UcNewsHeaderPagerBehavior.java

示例10: onStartNestedScroll

@Override
public boolean onStartNestedScroll(final CoordinatorLayout coordinatorLayout, final
FloatingActionButton child, final View directTargetChild, final View target, final int
                                           nestedScrollAxes) {
    return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL || super.onStartNestedScroll
            (coordinatorLayout, child, directTargetChild, target, nestedScrollAxes);
}
 
开发者ID:wmgylc,项目名称:The-Three-kingdoms-Generals-Dictionary,代码行数:7,代码来源:FABFadeBehavior.java

示例11: onStartNestedScroll

@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout,
                                   FloatingActionButton child, View directTargetChild, View target, int nestedScrollAxes) {
    return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL ||
            super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target,
                                      nestedScrollAxes);
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:7,代码来源:ScrollAwareFab.java

示例12: onStartNestedScroll

@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, V child, View directTargetChild, View target,
                                   int nestedScrollAxes) {
    mLastNestedScrollDy = 0;
    mNestedScrolled = false;
    return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0;
}
 
开发者ID:alphater,项目名称:garras,代码行数:7,代码来源:AnchorSheetBehavior.java

示例13: onStartNestedScroll

@Override public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child,
    View directTargetChild, View target, int nestedScrollAxes) {
  return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0;
}
 
开发者ID:liuguoquan727,项目名称:android-study,代码行数:4,代码来源:FooterBehavior.java

示例14: onStartNestedScroll

@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, FabSpeedDial child, View directTargetChild, View target, int nestedScrollAxes) {
    return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL;
}
 
开发者ID:gigabytedevelopers,项目名称:FireFiles,代码行数:4,代码来源:FabSpeedDialBehaviour.java

示例15: onStartNestedScroll

@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child, View directTargetChild, View target, int nestedScrollAxes) {
    return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0;
}
 
开发者ID:crazysunj,项目名称:CrazyDaily,代码行数:4,代码来源:ShowHideBottomBehavior.java


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