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 does not work as expected on Android vs Windows #13688

Closed
KWodarczyk opened this issue Mar 3, 2023 · 1 comment · Fixed by #14216
Closed

Shadow does not work as expected on Android vs Windows #13688

KWodarczyk opened this issue Mar 3, 2023 · 1 comment · Fixed by #14216
Assignees
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.0-preview.4.8333 Look for this fix in 8.0.0-preview.4.8333! platform/android 🤖 t/bug Something isn't working

Comments

@KWodarczyk
Copy link

KWodarczyk commented Mar 3, 2023

Description

Shadow does not work as expected on Android vs Windows, see the screens of the same code running on windows and android

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MauiTest.MainPage">
    <Grid
        HeightRequest="400"
        WidthRequest="600"
        Background="white"
        HorizontalOptions="Center"
        VerticalOptions="Center">

        <Rectangle
            WidthRequest="100"
            HeightRequest="20"
            Background="black">
            <Rectangle.Shadow>
                <Shadow
                    Brush="black"
                    Offset="0,10"
                    Radius="10"
                    Opacity="1"/>
            </Rectangle.Shadow>

        </Rectangle>
    </Grid>
</ContentPage>

code above produces the following UI on windows and Android

windows
image

android

image

offset set to 0,-10

                <Shadow
                    Brush="black"
                    Offset="0,-10"
                    Radius="10"
                    Opacity="1"/>

windows:

image

android:

image

Steps to Reproduce

Use the code in the description

Link to public reproduction project repository

https://github.com/KWodarczyk/MauiBugs/tree/main/Bugs/ShadowIssue

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android

Did you find any workaround?

no

Relevant log output

No response

@KWodarczyk KWodarczyk added the t/bug Something isn't working label Mar 3, 2023
@jsuarezruiz jsuarezruiz added area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 labels Mar 6, 2023
@rachelkang rachelkang added this to the Backlog milestone Mar 6, 2023
@ghost
Copy link

ghost commented Mar 6, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@jsuarezruiz jsuarezruiz self-assigned this Mar 22, 2023
rmarinho pushed a commit that referenced this issue Apr 26, 2023
* Fix issues with shapes shadows on Android

* Updated sample

* Added comments
@samhouts samhouts modified the milestones: Backlog, .NET 8 May 22, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.4.8333 Look for this fix in 8.0.0-preview.4.8333! label Jun 8, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.0-preview.4.8333 Look for this fix in 8.0.0-preview.4.8333! platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants