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

how to use circle ?? #105

Open
AnkitT77 opened this issue May 6, 2022 · 1 comment
Open

how to use circle ?? #105

AnkitT77 opened this issue May 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@AnkitT77
Copy link

AnkitT77 commented May 6, 2022

Version used:
Devices/Android versions reproduced on:

I would appreciate if you could attach:

  • Sample codes to trigger the issue.
  • A screenrecord or screenshots showing the issue.
    i try to use circle in background but i cant please provide us some code and example us to how to use circle in background.
@AnkitT77 AnkitT77 added the bug Something isn't working label May 6, 2022
@kia1349
Copy link

kia1349 commented Jun 20, 2022

i make it in this way:

    <soup.neumorphism.NeumorphButton
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_marginTop="10dp"
        android:text="۲۵"
        android:layout_gravity="center"
        android:textSize="16dp"
        android:textColor="@color/text_color"

        app:neumorph_backgroundColor="@color/background_color"
        app:neumorph_strokeColor="@color/grey_5"
        app:neumorph_strokeWidth="1dp"

        app:neumorph_inset="12dp"
        app:neumorph_insetStart="12dp"
        app:neumorph_insetEnd="12dp"
        app:neumorph_insetTop="12dp"
        app:neumorph_insetBottom="12dp"

        app:neumorph_shadowElevation="5dp"

        style="@style/Widget.Neumorph.ButtonCircle">
    </soup.neumorphism.NeumorphButton>

and for style="@style/Widget.Neumorph.ButtonCircle"
i make these change in theme.xml:

<style name="Widget.Neumorph.ButtonCircle" parent="Widget.AppCompat.Button">
    <item name="android:textAppearance">?android:attr/textAppearanceButton</item>
    <item name="android:minHeight">72dip</item>
    <item name="android:minWidth">112dip</item>
    <item name="android:paddingLeft">10dp</item>
    <item name="android:paddingRight">10dp</item>
    <item name="android:paddingTop">10dp</item>
    <item name="android:paddingBottom">10dp</item>
    <item name="android:stateListAnimator">@animator/button_state_list_anim_neumorph</item>
    <item name="android:focusable">true</item>
    <item name="android:clickable">true</item>
    <item name="android:gravity">center_vertical|center_horizontal</item>
    <item name="neumorph_inset">20dp</item>
    <item name="neumorph_shadowElevation">5dp</item>
    <item name="neumorph_shadowColorLight">@color/extra_light</item>
    <item name="neumorph_shadowColorDark">@color/grey_500</item>
    <item name="neumorph_shapeType">flat</item>
    <item name="neumorph_shapeAppearance">@style/ShapeAppearance.Neumorph.ButtonCircle</item>
</style>
<style name="ShapeAppearance.Neumorph.ButtonCircle" parent="">
    <item name="neumorph_cornerFamily">oval</item>
    <item name="neumorph_cornerSize">0dp</item>
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants