本文整理汇总了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;
}
}
}
示例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;//判断是否竖直滚动
}
示例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);
}
示例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;//判断是否竖直滚动
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例13: onStartNestedScroll
@Override public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child,
View directTargetChild, View target, int nestedScrollAxes) {
return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0;
}
示例14: onStartNestedScroll
@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, FabSpeedDial child, View directTargetChild, View target, int nestedScrollAxes) {
return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL;
}
示例15: onStartNestedScroll
@Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child, View directTargetChild, View target, int nestedScrollAxes) {
return (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0;
}