java - Android radius button -


i have button this

<button     android:id="@+id/button1"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:gravity="center"     android:layout_centerinparent="true"     android:text="buttontext"     style="@style/buttontext"/> 

and style

<style name="buttontext">     <item name="android:layout_margin">3dp</item>     <item name="android:textsize">20sp</item>     <item name="android:textstyle">bold</item>     <item name="android:shadowcolor">#000000</item>     <item name="android:shadowdx">1</item>     <item name="android:shadowdy">1</item>     <item name="android:shadowradius">2</item> </style> 

now want add radius button, have tried <item name="android:radius">6dp</item> not working. solution this?

i believe add radius button have create custom drawable (see link, shape drawable section)

then, drawable defined, set background xml tag of button equal drawable file:

android:background="@drawable/your_file"


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -