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

[How to use] Bug in example #77

Closed
geghamh2 opened this issue Apr 3, 2024 · 1 comment
Closed

[How to use] Bug in example #77

geghamh2 opened this issue Apr 3, 2024 · 1 comment
Assignees

Comments

@geghamh2
Copy link

geghamh2 commented Apr 3, 2024

Platforms

ANDROID

Description

In your example in ChatPage, when we change _addMessage(RandomTool.genInt(min: 1, max: 3))=> _addMessage(RandomTool.genInt(min: 10, max: 15)); keep position is not working correctly;

My code

No response

Try do it

No response

@LinXunFeng
Copy link
Member

Please refer to the last description of 3.1、Basic usage

Note: This feature relies on the latest message view before the message is inserted as a reference to calculate the offset, so if too many messages are inserted at once and the reference message view cannot be rendered, this feature will fail, and you need to try to avoid this problem by setting a reasonable value for cacheExtent of ScrollView by yourself!

The size calculation of cacheExtent can refer to the following formula:

cacheExtent = [maximum height of a message] * [number of messages inserted at one time] + 200

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