Skip to content

[Android]Fix: Swapping out the content of a RefreshView breaks on Android #28944

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

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

Conversation

bhavanesh2001
Copy link
Contributor

Description of Change

This issue occurs because SwipeRefreshLayout only lays out its child view when its own dimensions change. When new content is set dynamically and the container hasn't resized, _contentView is never measured or positioned, resulting in blank rendering.

The fix explicitly calls Layout(...) on _contentView during OnLayout, ensuring it is properly positioned even if the container size hasn't changed.

Before Fix After Fix
before_fix.mov
after_fix.mov

Issues Fixed

Fixes #28361

@bhavanesh2001 bhavanesh2001 requested a review from a team as a code owner April 11, 2025 21:28
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Apr 11, 2025
Copy link
Contributor

Hey there @@bhavanesh2001! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@bhavanesh2001
Copy link
Contributor Author

@jsuarezruiz could you run pipelines?

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

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

Successfully merging this pull request may close these issues.

[Android] Swapping out the content of a RefreshView breaks on Android
2 participants