XF-Material-Library icon indicating copy to clipboard operation
XF-Material-Library copied to clipboard

MaterialCard Shadow

Open Boukri opened this issue 4 years ago • 10 comments

🐛 Bug Report

Card shadow not showing

Expected behavior

As docs present => Elevation - The virtual distance along the z-axis. The value determines the importance of the content pesented in this view. The default value is 1. But there's no shadow dropped

My Code

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
             xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
             x:Class="LiteStock.Views.SellView" Title="بيع">
    <ContentPage.Content>
        <StackLayout>
            <material:MaterialCard CornerRadius="7" Margin="50" Elevation="8" HeightRequest="80" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                <StackLayout>
                    <Label Text="hello"/>
                </StackLayout>
            </material:MaterialCard>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

Pic of result

XFerror

Version: 1.7.8

Platform:

  • [ ] :robot: Android

Boukri avatar Aug 13 '21 16:08 Boukri

Hi @Boukri, Is it just on Android?

bricefriha avatar Aug 16 '21 12:08 bricefriha

@bricefriha I don't have mac to test this in ios :/

Boukri avatar Aug 16 '21 12:08 Boukri

@bricefriha I don't have mac to test this in ios :/

No problem, I'll be testing this on iOS to see if this impact both platforms 😉

bricefriha avatar Aug 16 '21 12:08 bricefriha

@bricefriha that's would be amazing!

Boukri avatar Aug 16 '21 12:08 Boukri

@bricefriha I don't have mac to test this in ios :/

No problem, I'll be testing this on iOS to see if this impact both platforms 😉

Is there any news about this?

Boukri avatar Aug 21 '21 15:08 Boukri

@Boukri Nope sorry, I'm quite busy these days, I try to take a look at that tomorrow 😉

bricefriha avatar Aug 21 '21 21:08 bricefriha

@Boukri Nope sorry, I'm quite busy these days, I try to take a look at that tomorrow 😉

Ok take your time 😁

Boukri avatar Aug 21 '21 22:08 Boukri

@Boukri So, I copy-pasted your code and it works on iOS seemingly, however on Android, I've had a better result than yours (even though it's still not great 😅). In the sense that I can see the card but the shadow is not there at all.

I'm currently working with a client on an app that uses this library and I'm not facing the issue, though. However, I don't believe you did anything wrong, So I'm gonna take a look at this and let you know 😉

bricefriha avatar Aug 22 '21 16:08 bricefriha

@Boukri So, I copy-pasted your code and it works on iOS seemingly, however on Android, I've had a better result than yours (even though it's still not great 😅). In the sense that I can see the card but the shadow is not there at all.

I'm currently working with a client on an app that uses this library and I'm not facing the issue, though. However, I don't believe you did anything wrong, So I'm gonna take a look at this and let you know 😉

Thank you so much for your efforts, for this moment i changed the material card with just frame, in order to save my client and avoiding any UI issues. So I'll be waiting for your reply 😁

Boukri avatar Aug 22 '21 16:08 Boukri

@Boukri That's wise indeed, that's also what I did for one of the other issues 😄

bricefriha avatar Aug 22 '21 16:08 bricefriha