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] InputTransparent="true" on a Layout breaks child controls - Fix #22345

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

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented May 11, 2024

Issues Fixed

Fixes #22289

Before After
bug.mov
fixed.mov

@kubaflo kubaflo requested a review from a team as a code owner May 11, 2024 14:38
@kubaflo kubaflo requested review from rmarinho and PureWeen May 11, 2024 14:38
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label May 11, 2024
Copy link
Contributor

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.

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@@ -417,6 +417,8 @@ public static void MapContainerView(IViewHandler handler, IView view)
handler.HasContainer = viewHandler.NeedsContainer;
else
handler.HasContainer = view.NeedsContainer();

handler.UpdateValue(nameof(IView.Visibility));
Copy link
Member

Choose a reason for hiding this comment

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

I think we also need to add

handler.UpdateValue(nameof(IView.Opacity))

and remove this line from LabelHandler.windows.cs

    public static void MapOpacity(ILabelHandler handler, ILabel label)
    {
        handler.UpdateValue(nameof(IViewHandler.ContainerView)); // this line
        handler.PlatformView.UpdateOpacity(label);
        handler.ToPlatform().UpdateOpacity(label);
    }

I think when "handler.UpdateValue(nameof(IViewHandler.ContainerView));" was originally added we didn't have the correct MapContainerview flow, so it made sense there

You only need to update the ContainerView if that property would result in the container getting added/removed

@jsuarezruiz jsuarezruiz added platform/android 🤖 area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter labels May 13, 2024
@mattleibow
Copy link
Member

mattleibow commented May 16, 2024

We got a few issues with the changing container view that I tried to look at here #13114

I don't think my PR is right and needs to be done differently, but this container view issue is all over the properties.

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

handler.UpdateValue(nameof(IView.Visibility));

#if WINDOWS
handler.UpdateValue(nameof(IView.Opacity));
Copy link
Member

Choose a reason for hiding this comment

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

Do we know if it is just windows only? Somehow I feel opacity is such a basic feature it affects more and we just saw it with windows first.

If we don't want to move the cheese to much in the PR, maybe just make this comment an issue and I can have a look when I get back to my keyboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter community ✨ Community Contribution platform/android 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InputTransparent="true" on a Layout breaks child controls on Android
4 participants