android.support.v4.view.ViewCompat#stopNestedScroll ( )源码实例Demo

下面列出了android.support.v4.view.ViewCompat#stopNestedScroll ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: CameraBlur   文件: FixAppBarLayoutBehavior.java
private void stopNestedScrollIfNeeded(int dy, AppBarLayout child, View target, int type) {
    if (type == ViewCompat.TYPE_NON_TOUCH) {
        final int currOffset = getTopAndBottomOffset();
        if ((dy < 0 && currOffset == 0)
                || (dy > 0 && currOffset == -child.getTotalScrollRange())) {
            ViewCompat.stopNestedScroll(target, ViewCompat.TYPE_NON_TOUCH);
        }
    }
}
 
源代码2 项目: px-android   文件: FixAppBarLayoutBehavior.java
private void stopNestedScrollIfNeeded(final int dy,
    @NonNull final AppBarLayout child,
    @NonNull final View target, final int type) {

    if (type == ViewCompat.TYPE_NON_TOUCH) {
        final int currOffset = getTopAndBottomOffset();
        if ((dy < 0 && currOffset == 0)
            || (dy > 0 && currOffset == -child.getTotalScrollRange())) {
            ViewCompat.stopNestedScroll(target, ViewCompat.TYPE_NON_TOUCH);
        }
    }
}
 
源代码3 项目: fdroidclient   文件: FixAppBarLayoutBehavior.java
private void stopNestedScrollIfNeeded(int dy, AppBarLayout child, View target, int type) {
    if (type == ViewCompat.TYPE_NON_TOUCH) {
        final int currOffset = getTopAndBottomOffset();
        if ((dy < 0 && currOffset == 0)
                || (dy > 0 && currOffset == -child.getTotalScrollRange())) {
            ViewCompat.stopNestedScroll(target, ViewCompat.TYPE_NON_TOUCH);
        }
    }
}
 
源代码4 项目: customview-samples   文件: NestedChildHelper.java
/**
 * Enable nested scrolling.
 *
 * <p>This is a delegate method. Call it from your {@link android.view.View View} subclass
 * method/{@link android.support.v4.view.NestedScrollingChild} interface method with the same
 * signature to implement the standard policy.</p>
 *
 * @param enabled true to enable nested scrolling dispatch from this view, false otherwise
 */
public void setNestedScrollingEnabled(boolean enabled) {
    if (mIsNestedScrollingEnabled) {
        ViewCompat.stopNestedScroll(mView);
    }
    mIsNestedScrollingEnabled = enabled;
}
 
源代码5 项目: customview-samples   文件: NestedChildHelper.java
/**
 * View subclasses should always call this method on their
 * <code>NestedScrollingChildHelper</code> when detached from a window.
 *
 * <p>This is a delegate method. Call it from your {@link android.view.View View} subclass
 * method/{@link android.support.v4.view.NestedScrollingChild} interface method with the same
 * signature to implement the standard policy.</p>
 */
public void onDetachedFromWindow() {
    ViewCompat.stopNestedScroll(mView);
}
 
源代码6 项目: customview-samples   文件: NestedChildHelper.java
/**
 * Called when a nested scrolling child stops its current nested scroll operation.
 *
 * <p>This is a delegate method. Call it from your {@link android.view.View View} subclass
 * method/{@link android.support.v4.view.NestedScrollingChild} interface method with the same
 * signature to implement the standard policy.</p>
 *
 * @param child Child view stopping its nested scroll. This may not be a direct child view.
 */
public void onStopNestedScroll(@NonNull View child) {
    ViewCompat.stopNestedScroll(mView);
}
 
 同类方法