Code Monkey home page Code Monkey logo

Comments (3)

Akshay-Vtro avatar Akshay-Vtro commented on May 25, 2024 3

@JyotimoyKashyap I'm really glad you made the button I wanted .... thank you for your help

from synth-android.

JyotimoyKashyap avatar JyotimoyKashyap commented on May 25, 2024 2

I have tried to recreate the button style that you have specified. I may not have been able to achieve the desired look to 100% but I think this should help in getting the idea for customizing the button as per one needs.

achieved look

Below is the code that I used in the layout.xml file

 <club.cred.synth.views.SynthButton
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      app:neuButtonType="elevated_flat"
      app:neuFlatButtonAppearance="@style/button_flat_appearance"
      app:neuPlatformAppearance="@style/button_platform_appearance"
      android:paddingStart="40dp"
      android:paddingEnd="40dp"
      android:paddingTop="20dp"
      android:paddingBottom="20dp"
      android:textSize="15dp"
      android:textStyle="bold"
      android:textColor="@color/white"
      android:text="Proceed to pay"/>

Below is the configuration I used in themes.xml

<style name="button_platform_appearance">
    <item name="neuLightShadowColor">#505050</item>
    <item name="neuDarkShadowColor">#0f0d0f</item>
    <item name="neuFillStartColor">#3bcf33</item>
    <item name="neuFillEndColor">#1e8b1c</item>
    <item name="neuFillPressedStartColor">#34A814</item>
    <item name="neuFillPressedEndColor">#34A814</item>
    <item name="neuBorderStartColor">#34A814</item>
    <item name="neuBorderEndColor">#34A814</item>
    <item name="neuBorderPressedStartColor">#34A814</item>
    <item name="neuBorderPressedEndColor">#34A814</item>
</style>

<style name="button_flat_appearance">
    <item name="neuButtonStartColor">#40F40E</item>
    <item name="neuButtonEndColor">#3CD611</item>
    <item name="neuButtonBorder1StartColor">#34A814</item>
    <item name="neuButtonBorder1EndColor">#34A814</item>
    <item name="neuButtonBorder2StartColor">#34A814</item>
    <item name="neuButtonBorder2EndColor">#34A814</item>
    <item name="neuButtonPressedDarkShadowColor">#34A814</item>
</style>

Hope with this you will be able to achieve the desired look.

from synth-android.

Akshay-Vtro avatar Akshay-Vtro commented on May 25, 2024

But it doesn't have that elevated_soft click effect

from synth-android.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.