maui icon indicating copy to clipboard operation
maui copied to clipboard

[Android] Fix Frame opacity

Open GalaxiaGuy opened this issue 3 years ago • 4 comments

Description of Change

Adds an entry into the property mapper for Android FrameRenderer to trigger Opacity handling when a Frame is initially created on Android

Issues Fixed

Fixes #10220 Frame.Opacity has no Effect Fixes part of #10503 Opacity not applied to BoxView and Frame (the Frame opacity issue is the same as #10220 and a test is included that fails to reproduce the issue with BoxView).

Details

I don't know if this the right approach. I've been following how handlers work, but Frame doesn't seem to follow the patterns exactly, presumably because it is mainly a compatibility control.

Stepping through the code, it looks like the initial properties are set using keys of the handlers, which does not contain Opacity, but updating the property works because it uses ViewHandlerDelegator.

This adds an entry to the FrameRenderer PropertyMapper that calls the UpdateOpacity extension method.

GalaxiaGuy avatar Oct 13 '22 19:10 GalaxiaGuy

Hey there @GalaxiaGuy! 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 avatar Oct 13 '22 19:10 ghost

/azp run

rmarinho avatar Oct 14 '22 10:10 rmarinho

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Oct 14 '22 10:10 azure-pipelines[bot]

I think a similar issue might be causing #8840 TranslationY does not work on Frame component.

GalaxiaGuy avatar Oct 14 '22 19:10 GalaxiaGuy

Closing this PR for now in favor of https://github.com/dotnet/maui/pull/10751

Thank you @GalaxiaGuy for finding this!!! This will probably close out a bunch of Frame issues.

PureWeen avatar Oct 20 '22 15:10 PureWeen