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 box view properties #21322

Merged
merged 6 commits into from
Apr 13, 2024
Merged

[Android] Fixed box view properties #21322

merged 6 commits into from
Apr 13, 2024

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Mar 20, 2024

Description

The properties of BoxView haven't been automatically applied. Only when modified in the code after being initialized the changes be applied. It could be also replicated with a hot reload.

Issues Fixed

Fixes #19926

Before After

@kubaflo kubaflo requested a review from a team as a code owner March 20, 2024 01:16
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Mar 20, 2024
@jsuarezruiz jsuarezruiz added t/bug Something isn't working legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels Mar 20, 2024
@rmarinho
Copy link
Member

/azp run MAUI-UITests-public

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Hey Rui, do you know why the UITest task is not running in this case?

@rmarinho
Copy link
Member

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -64,7 +64,7 @@ protected override void OnPropertyChanged([CallerMemberName] string? propertyNam

PathAspect IShapeView.Aspect => PathAspect.None;

Paint? IShapeView.Fill => Color?.AsPaint() ?? ((IView)this).Background;
Paint? IShapeView.Fill => Color?.AsPaint();
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand how this fixes it ,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rmarinho I've noticed that the box view is rendered twice. It is easy to observe when setting the translationY property to 200. This is the outcome:
Screenshot_2024-03-23_at_06 41 39

With this ((IView)this).Background part removed from the code the shapeViewHandler doesn't update the background and therefore does not draw that top right boxView

if (shapeView.Background is not null && shapeView.Fill is not null)

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.iOS, TestDevice.Mac, TestDevice.Windows });
_ = App.WaitForElement("boxView");

VerifyScreenshot();
Copy link
Contributor

Choose a reason for hiding this comment

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

Added pending snapshot.

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen enabled auto-merge (squash) April 12, 2024 14:46
@PureWeen
Copy link
Member

/rebase

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen merged commit 70e8800 into dotnet:main Apr 13, 2024
47 checks passed
@Eilon Eilon added area-controls-boxview area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-controls-boxview labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing community ✨ Community Contribution t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opacity bug on BoxView.Background
5 participants