nstudio / nativescript-cardview

:diamonds: :clubs: NativeScript widget for Material Design CardView
MIT License
282 stars 51 forks source link

Round Shape #88

Closed dndeus closed 6 years ago

dndeus commented 6 years ago

Hi and thank you for this module.

Just a quick question, Is it possible to make a round cardview? I tried the following but it doesn't seem to work

<CardView width="40" height="40" borderRadius="50%" elevation="10" radius="1">
    <GridLayout
            width="40"
            height="40"
            borderRadius="50%">
        <Label
                text="Some icon"
                textWrap="true"
                verticalAlignment="middle"
                textAlignment="center"></Label>
    </GridLayout>
</CardView>

Thank you in advance

dndeus commented 6 years ago

Oh I didn't notice the radius property.

Sorry for the false alarm. Here is my final example in case someone else needs it.

<CardView width="40" height="40" radius="60" elevation="10" >
    <GridLayout
            width="40"
            height="40"
            borderRadius="50%">
        <Label
                text="Some icon"
                textWrap="true"
                verticalAlignment="middle"
                textAlignment="center"></Label>
    </GridLayout>
</CardView>