I was trying to create a button similar in look to the round buttons over here -
http://livetools.uiparade.com/index.html
(every button looks like it is inside an immersed section) I had it by placing the button
in a circle background and giving them both a little gradient that didnt end up the same
though I got this result -
(I will upload my code once I can) how can I achieve that same look?
Go to this link and Generate Custom 3D button.
http://angrytools.com/android/button/
buttonshape.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<corners
android:radius="30dp"
/>
<gradient
android:gradientRadius="45"
android:centerX="35%"
android:centerY="50%"
android:startColor="##4CAB0B"
android:endColor="#004507"
android:type="radial"
/>
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
/>
<size
android:width="270dp"
android:height="60dp"
/>
<stroke
android:width="3dp"
android:color="#0B8717"
/>
</shape>
Button Code
<Button
android:id="@+id/angry_btn"
android:text="Button"
android:textColor="#FFFFFF"
android:textSize="30sp"
android:layout_width="270dp"
android:layout_height="60dp"
android:background="@drawable/buttonshape"
android:shadowColor="#A8A8A8"
android:shadowDx="3"
android:shadowDy="2"
android:shadowRadius="8"
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With