Skip to content

[Android] Button with shadow broken on Android device #29325

@Victor-Porter

Description

@Victor-Porter

Description

When I add a shadow to a button on an Android device, several things happen:

  1. The shadow does not apply well to a button with rounded borders. [Tracked here: [Android] Button with corner radius shadow broken on Android device #20596]
  2. The color of the Brush property of the Shadow does not recognize the transparency value in #AARRGGBB format. According to its documentation it is a valid format. iOS and Windows recognise this format.
  3. The shadow has a solid color.

I attach an image with the errors:

Image

This happens only on Android, on Windows and iOS, it works fine.

Steps to Reproduce

  1. Create a new MAUI project.
  2. Add a button with rounded borders, shadow, and a brush color with transparency.
<Button
    CornerRadius="8"
    Text="Button without transparency [#000000]">
    <Button.Shadow>
        <Shadow Brush="#000000"
                Offset="0,4"
                Radius="4" />
    </Button.Shadow>
</Button>

<Button
    CornerRadius="8"
    Text="Button with 35% of transparency [#59000000]">
    <Button.Shadow>
        <Shadow Brush="#59000000"
                Offset="0,4"
                Radius="4" />
    </Button.Shadow>
</Button>
  1. Launch the application and see the error.

Link to public reproduction project repository

Maui.App.Shadow.zip

Version with bug

9.0.60 SR6

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.30 SR3

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingi/regressionThis issue described a confirmed regression on a currently supported versionp/0Work that we can't release withoutpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androidregressed-in-9.0.40s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions