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] Fix for frame disappears when assigning GradientStops to LinearGradientBrush inside this Frame #25851

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

Conversation

Tamilarasan-Paranthaman
Copy link
Contributor

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman commented Nov 14, 2024

Root Cause of the Issue

  • When dynamically updating the GradientStops binding of the LinearGradientBrush used in the Frame background, the Frame's corner radius resets to 0, and the border color reverts to its default. This occurs because updating the GradientStops causes the backgroundDrawable to be disposed of and recreated, which leads to the default corner radius and border color being applied, resulting in this issue.

Description of Change

Issues Fixed

Fixes #23951

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 14, 2024
@jsuarezruiz jsuarezruiz added platform/android 🤖 area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing area-controls-frame Frame labels Nov 14, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

{
App.WaitForElement("Button");
App.Tap("Button");
VerifyScreenshot();
Copy link
Contributor

Choose a reason for hiding this comment

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

Snapshots available in the latest build.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsuarezruiz, the snapshot has been added.

@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
Labels
area-controls-frame Frame area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing community ✨ Community Contribution platform/android 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] Frame disappears when assigning GradientStops to LinearGradientBrush inside this Frame
2 participants