fornewid / neumorphism

Try to Neumorphism in Android (Just experimental!! 🧪)
https://medium.com/@fornewid/neumorphism-in-android-9cf15e2122dc
Apache License 2.0
977 stars 159 forks source link

i want to set text on neumorphism rectangle shape #52

Open Octopus7597 opened 4 years ago

Octopus7597 commented 4 years ago

Describe the request you'd like: A clear and concise description of what you want.

Additional context: Add any other context or screenshots about the feature request here.

sen9040 commented 3 years ago

How do I change the corner radius of the card view in xml?

AmirMahdaviAM commented 3 years ago

i want to set text on neumorphism rectangle shape

You can use TextView in a CardView

How do I change the corner radius of the card view in xml?

Add this line to your CardView xml

app:neumorph_shapeAppearance="@style/CustomShapeAppearance">
    <soup.neumorphism.NeumorphCardView
        android:id="@+id/edittext_card"
        style="@style/Widget.Neumorph.CardView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:neumorph_shapeAppearance="@style/CustomShapeAppearance">

        .......

    </soup.neumorphism.NeumorphCardView>

And create a new style with custom size for all corner

    <style name="CustomShapeAppearance">
        <item name="neumorph_cornerFamily">rounded</item>
        <item name="neumorph_cornerSize">16dp</item>
    </style>

Or specify each one

    <style name="CustomShapeAppearance">
        <item name="neumorph_cornerFamily">rounded</item>
        <item name="neumorph_cornerSizeTopLeft">64dp</item>
        <item name="neumorph_cornerSizeTopRight">64dp</item>
        <item name="neumorph_cornerSizeBottomLeft">64dp</item>
        <item name="neumorph_cornerSizeBottomRight">64dp</item>
    </style>