Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问怎么根据滑动的距离计算出最近的一个index #85

Closed
CookerMa opened this issue Jul 2, 2024 · 3 comments
Closed

请问怎么根据滑动的距离计算出最近的一个index #85

CookerMa opened this issue Jul 2, 2024 · 3 comments
Assignees

Comments

@CookerMa
Copy link

CookerMa commented Jul 2, 2024

No description provided.

@LinXunFeng
Copy link
Member

不太明白你的意思,请举例说明

@CookerMa
Copy link
Author

CookerMa commented Jul 2, 2024

就是歌词的那种效果,但是每个item高度不一样,滑动一段距离之后,滚动到中间

WeChat_20240702232317.mp4

@LinXunFeng
Copy link
Member

ListViewObserverleadingOffset 的值设置为屏幕中间虚线的偏移量就可以了。

image

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

No branches or pull requests

2 participants