android - Button with distinct corners and an Image at centre -


i need button left side rounded corners , right side flat corners.

complete rounded corners possible code:

<corners         android:bottomleftradius="25dp"         android:bottomrightradius="25dp"         android:topleftradius="25dp"         android:toprightradius="25dp"/> 

resultant image:

done

now need image similar following one:

enter image description here

i've tried follwing code:(sorry..this answer.but not reflecting in xml)

<corners         android:bottomleftradius="25dp"         android:bottomrightradius="25dp"         android:topleftradius="0dp"         android:toprightradius="0dp"/> 

but not correct one.

to centre image tried following code:

<button                 android:layout_width="0dp"                 android:layout_height="wrap_content"                 android:background="@drawable/border2"                 android:layout_weight="0.5"                 android:layout_margin="10dp"                 android:paddingright="50dp"                 android:paddingleft="50dp"                 android:drawableright="@drawable/facebook"   /> 

this fixed image @ centre.but there other way it?

if nothing else helps, can use 9-patch image.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -