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

Fixes endless loop of HorizontalScroll #22628

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

Conversation

BaY1251
Copy link

@BaY1251 BaY1251 commented May 24, 2024

Description of Change

I know PR #22347 has fixed #20684. But,I am still searching for the root cause of the problem.
I printed the log and saw that the height was constantly being changed to completely different values.
I think MauiScrollView.OnLayout is where the modifications should be made.

Change \src\Core\src\Platform\Android\MauiScrollView.cs

Log:
#22566 (comment)

Issues Fixed

Fixes #20684

@BaY1251 BaY1251 requested a review from a team as a code owner May 24, 2024 03:27
@BaY1251 BaY1251 requested review from Eilon and jfversluis May 24, 2024 03:28
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label May 24, 2024
Copy link
Contributor

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

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@@ -214,7 +214,7 @@ protected override void OnLayout(bool changed, int left, int top, int right, int
{
base.OnLayout(changed, left, top, right, bottom);

if (_hScrollView?.Parent == this && _content is not null)
if (changed && _hScrollView?.Parent == this && _content is not null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue still happens after merge #22347?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR22347 has fixed this issue and performed very well.
This PR attempts to solve the problem from another perspective, that is, the _hScrollView should not be adjusted when 'changed' is' false '.

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][MAUI-8.0.7] CPU usage consistently remains above 10%, even without any operation
2 participants