Maui Android parent view inappropriately creates clipping mask when its opacity is less than 1, cropping out children #22038
Labels
area-drawing
Shapes, Borders, Shadows, Graphics, BoxView, custom drawing
platform/android 🤖
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
If you (1) set up a simple hierarchy with an AbsoluteLayout as parent, (2) add some random views as its children, (3) set some small dimensions of the AbsoluteLayout, then (4) set the AbsoluteLayout's opacity <1, behavior is abnormal in Android:
Windows: Still can see all children at reduced opacity (expected behavior):

Android: AbsoluteLayout develops a clipping mask and crops out all children to dimensions of AbsoluteLayout setting (wrong behavior):

In the example above we have a plain AbsoluteLayout with a red Border, cat Image, and simple "HELLO" Label as children.
In Windows we see all children fully at reduced opacity as expected.
In Android everything gets clipped out to the sliver of the AbsoluteLayout's small dimensions (wrong behavior).
I am currently unable to test iOS so don't know what that would do.
Steps to Reproduce
All code is in App.xaml.cs (otherwise using default Maui project):
Link to public reproduction project repository
https://github.com/jonmdev/AndroidOpacityBug
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
No, this is something new
Affected platforms
Android
The text was updated successfully, but these errors were encountered: