question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MaterialCard Shadow

See original GitHub issue

🐛 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:

  • 🤖 Android

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Boukricommented, Aug 22, 2021

@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 😁

1reaction
Boukricommented, Aug 21, 2021

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

Ok take your time 😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

Material Design Box Shadows
Demo of material design box shadows based on https://medium.com/@Florian/freebie-google-material-design-shadow-helper-2a0501295a2d -->.
Read more >
Light and shadows
On the web, shadows are depicted by manipulating the y-axis only. The following example shows a card with an elevation of 6dp. Don'tShadow...
Read more >
Elevation & shadows
Shadows provide important visual cues about objects' depth and directional movement. They are the only visual cue indicating the amount of separation between ......
Read more >
Material Design Box Shadows - HTMLCSSFreebies
In the Material Design, Shadows provide cues about depth, the direction of movement, and surface edges. Because shadows express the degree of elevation ......
Read more >
Angular Material card shadow colour
Is there any way to change the colour of the shadow which is dark under the card? If any solution please let me...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found