zan23
New Member
Posts: 1
|
Post by zan23 on Feb 16, 2021 10:21:11 GMT
I am making a chat panel and I have a problem with scroller position. I took Pagination example and I have reversed it, so when you scrole to the top, new content (old messages) loads. Everything is working fine if you scroll with mosue wheel (when new content loads you stay at the same position), but the problem is if you drag the scrollview with mouse and you don't release it, it will start jumping up and down (this is because Scroll Position is reseting to 0 for some reason and new data is added again which trigger jumpToIndex function again).
Detailed explanation:
When user scrolls to the top by draging it with the mouse, I invoke function that adds old messages from the database to my list by inserting it at the start of the list. After populating the list I call ReloadData(); and jumpToDataIndex(positionIndex, 1, 1); if you move the mouse while you still holding it down, the Scroll Position resets to 0 and that makes the scrollview to jump up.
Can you please help me solve this issue?
Thank you
Edit: I have also tried with jumpToDataIndex(positionIndex, 0, 0); and I get the same resoults.
|
|
|
Post by echo17 on Feb 16, 2021 14:18:31 GMT
I'm having trouble visualizing the issue. If you could put together a simple project demonstrating what you are seeing, that would help me diagnose. Please be sure to include the steps for me to take to reproduce, and what you are expecting to see instead. Please see this FAQ for more information: link
|
|