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:
now need image similar following one:
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
Post a Comment