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

Shadow not rendering properly[Android] #20518

Open
MohanrajSF3559 opened this issue Feb 12, 2024 · 3 comments
Open

Shadow not rendering properly[Android] #20518

MohanrajSF3559 opened this issue Feb 12, 2024 · 3 comments
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 t/bug Something isn't working
Milestone

Comments

@MohanrajSF3559
Copy link

MohanrajSF3559 commented Feb 12, 2024

Description

The shadow was not applied to the right and bottom of all the layouts (I have added a sample grid). I have attached the sample for that.
With clip sample below:

public class CustomView : Grid
{
    public CustomView()
    {
        this.HeightRequest = 300;
        this.WidthRequest = 300;
        this.BackgroundColor = Colors.Lavender;
        this.Shadow = new Shadow()
        {
            Brush = Brush.Red,
            Opacity = 5,
            Offset = new Point(1, 1),
        };
        this.Clip = new RoundRectangleGeometry(new CornerRadius(20), new Rect(0, 0, 300, 300));
    }
}

You can see the differences between.NET MAUI 7 and 8 below.
In Android With Clip output in.NET MAUI 7:
image

In Android With Clip output in.NET MAUI 8:
image

Without Clip Sample below:

public class CustomView : Grid
{
    public CustomView()
    {
        this.HeightRequest = 300;
        this.WidthRequest = 300;
        this.BackgroundColor = Colors.Lavender;
        this.Shadow = new Shadow()
        {
            Brush = Brush.Red,
            Opacity = 5,
            Offset = new Point(1, 1),
        };
    }
}

You can see the differences between.NET MAUI 7 and 8 below.
In Android Without Clip output in.NET MAUI 7:
image

In Android Without Clip output in.NET MAUI 8:
image

In the above with and without clip sample in.NET MAUI 7 and 8, the shadow was applied properly, like in the below image.

Windows output without clip in.NET 7 and 8.
image

Windows output with clip-in.NET MAUI 7 and 8.
image

Steps to Reproduce

  1. Run the sample in Android.
  2. You can see the output.

Link to public reproduction project repository

https://github.com/dotnet/maui/files/14238936/Shadoweffect.zip

Version with bug

Unknown/Other

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 13

Did you find any workaround?

No response

Relevant log output

No response

@MohanrajSF3559 MohanrajSF3559 added the t/bug Something isn't working label Feb 12, 2024
@PureWeen
Copy link
Member

Duplicate of #15023

@PureWeen PureWeen marked this as a duplicate of #15023 Feb 12, 2024
@PureWeen PureWeen added platform/android 🤖 area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing labels Feb 12, 2024
@PureWeen PureWeen added this to the Backlog milestone Feb 12, 2024
@ghost
Copy link

ghost commented Feb 12, 2024

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@MohanrajSF3559
Copy link
Author

Hi, @PureWeen ,

If you have any workarounds for this issue,. If you know, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants