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

[Android] Fixed ListView items height are not proper in initial loading with HasUnevenRows set as True. #26841

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

NirmalKumarYuvaraj
Copy link
Contributor

@NirmalKumarYuvaraj NirmalKumarYuvaraj commented Dec 27, 2024

Issue details

The ListView item heights are incorrect when the HasUnevenRows property is set to true during the initial load, even though the height of each cell is explicitly defined.

Root cause

The cell's height is set incorrectly during the measure call.

Description of change

If a valid height is set for the cell, we can use it as the cell's height after converting it to pixels.

Reference

height = (int)Context.ToPixels(_viewCell.Height > 0 ? _viewCell.Height : measure.Request.Height);

Validated the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #26820

Output

Before After
Before.mov
After.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 27, 2024
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 31, 2024
@NirmalKumarYuvaraj NirmalKumarYuvaraj marked this pull request as ready for review January 2, 2025 11:53
@NirmalKumarYuvaraj NirmalKumarYuvaraj requested a review from a team as a code owner January 2, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListView items height are not proper in initial loading with HasUnevenRows set as True.
2 participants