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

Fixed [Android] ListView scroll position maintains after items refresh #26723

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NirmalKumarYuvaraj
Copy link
Contributor

@NirmalKumarYuvaraj NirmalKumarYuvaraj commented Dec 19, 2024

Issue Details:

ListView scroll position maintains after cleared and added data to the existing collection.

Root Cause:

The native Android ListView retains its scroll position even after the data is reset.

Description of Change:

When the data is reset, the scroll position is programmatically set to the 0th item (top of the list) on CollectionChanged event.

Test Case PR
I will enable the test case for android platform , once this #26674 gets merged.

Tested the behavior in the following platforms.

  • Android
  • Windows
  • iOS
  • Mac

Reference:

https://stackoverflow.com/questions/2889793/android-listview-scrolling-to-top

Issues Fixed:

Fixes #26661
Fixes #25256

Screenshots

Before Issue Fix After Issue Fix
Before_Issue26661.mov
After_Issue26661.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 19, 2024
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 19, 2024
@PureWeen PureWeen added the area-controls-listview ListView and TableView label Dec 20, 2024
@NirmalKumarYuvaraj NirmalKumarYuvaraj marked this pull request as ready for review December 23, 2024 06:11
@NirmalKumarYuvaraj NirmalKumarYuvaraj requested a review from a team as a code owner December 23, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-listview ListView and TableView community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
4 participants