美文网首页
CollapsingToolbarLayout 与Recycle

CollapsingToolbarLayout 与Recycle

作者: Android一行代码 | 来源:发表于2021-01-27 11:08 被阅读0次
 * 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;
}

重点:启用嵌套滚动,参数启用为true以从此视图启用嵌套滚动调度,否则为false

内部嵌套的recyclerview调用setNestedScrollingEnabled(false);

就可以解决了.

相关文章

网友评论

      本文标题:CollapsingToolbarLayout 与Recycle

      本文链接:https://www.haomeiwen.com/subject/ivnozktx.html