Skip to content

Make sure to redraw the background drawable when the size is updated#22626

Merged
PureWeen merged 9 commits into
mainfrom
fix_22606
May 30, 2024
Merged

Make sure to redraw the background drawable when the size is updated#22626
PureWeen merged 9 commits into
mainfrom
fix_22606

Conversation

@PureWeen
Copy link
Copy Markdown
Member

@PureWeen PureWeen commented May 24, 2024

Description of Change

Inside the MauiDrawable we store the Android rect and then compare the size to see if we need to redraw it. It looks like the bounds object that's passed into OnBoundsChange is the same object reference as the one we store. So, when those bounds values get updated, our stored bounds still matches because they are the same instance

This broke because of this PR because now we're creating way fewer ping pongs of layout invalidation which will cause issues like this to some time surface.

Issues Fixed

Fixes #22606

@jsuarezruiz jsuarezruiz added t/bug Something isn't working platform/android area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing labels May 24, 2024
jsuarezruiz
jsuarezruiz previously approved these changes May 24, 2024
@PureWeen PureWeen marked this pull request as ready for review May 24, 2024 17:56
@PureWeen PureWeen requested a review from a team as a code owner May 24, 2024 17:56
@PureWeen PureWeen requested review from Eilon and tj-devel709 May 24, 2024 17:56
@PureWeen PureWeen changed the title Fix 22606 Make sure to redraw the background drawable when the size is updated May 24, 2024
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is not important for this PR, but just like we do in portrait, in landscape we must eliminate the navigation bar.

@jsuarezruiz
Copy link
Copy Markdown
Contributor

Added Windows snapshots
image

@PureWeen PureWeen merged commit a9615bf into main May 30, 2024
@PureWeen PureWeen deleted the fix_22606 branch May 30, 2024 16:09
@PureWeen
Copy link
Copy Markdown
Member Author

@jsuarezruiz only added some screen shots to finalize the tests I wrote.

I'm going to merge this one based on his approval.

@github-actions github-actions Bot locked and limited conversation to collaborators Jun 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.60 fixed-in-9.0.0-preview.5.24307.10 platform/android t/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Border doesnt expand on Content size changed

4 participants