Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

可以设置是否需要悬停吗? #153

Open
springtom opened this issue Nov 24, 2017 · 1 comment
Open

可以设置是否需要悬停吗? #153

springtom opened this issue Nov 24, 2017 · 1 comment

Comments

@springtom
Copy link

可以设置是否需要悬停吗?

@wirteEable
Copy link

StickyRecyclerHeadersDecoration 下 onDrawOver 方法内, 增加如下代码。可以取消悬停,你可以试一下
mHeaderPositionCalculator.initHeaderBounds(headerOffset, parent, header, itemView, hasStickyHeader);
if (isForbiddenSticky) {
// 屏蔽sticky状态,让最上面的header 跟着布局往上走 start
float height = itemView.getY() - header.getHeight();
if (height < 0) {
headerOffset.top = (int) height;
}
// 屏蔽sticky状态,让最上面的header 跟着布局往上走 end
}
mRenderer.drawHeader(parent, canvas, header, headerOffset);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants