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 border inside frame not rendering #20974

Closed
wants to merge 2 commits into from

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Mar 4, 2024

Issues Fixed

Fixes #18526
Fixes #18755
Fixes #20944

Before After

@kubaflo kubaflo requested a review from a team as a code owner March 4, 2024 00:04
@ghost ghost added the community ✨ Community Contribution label Mar 4, 2024
@ghost
Copy link

ghost commented Mar 4, 2024

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

@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 4, 2024
{
if (child is IShape)
{
((VisualElement)child).IsVisible = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you share more details about this change?

Copy link
Contributor Author

@kubaflo kubaflo Mar 4, 2024

Choose a reason for hiding this comment

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

@jsuarezruiz When we set the property IsVisible to false then the parent layout doesn't consider this shape when calculating the required size for its content.

https://github.com/kubaflo/maui/blob/9d50c370103718c654d67d51fc13827719f125fa/src/Controls/src/Core/Layout.cs#L663

Copy link
Member

Choose a reason for hiding this comment

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

Can we just set DisableLayout to true?

if (Width <= 0 || Height <= 0 || !LogicalChildrenInternal.Any() || !IsVisible || !IsPlatformStateConsistent || DisableLayout)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PureWeen I tried but it doesn't work:

                       if (content is Border border)
			{
				var shape = border.LogicalChildrenInternal.FirstOrDefault(child => child is IShape);
				if (shape is VisualElement visualElement)
				{
					visualElement.DisableLayout = true; // doesn't work
					visualElement.IsVisible = false; // works
				}
			}

@jsuarezruiz
Copy link
Contributor

Probably #20944 is also related with these changes.

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
@PureWeen
Copy link
Member

replaced by #23124

@PureWeen PureWeen closed this Jun 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants