I need a button with left side rounded corners and right side flat corners.
complete rounded corners is possible with this code:
<corners
android:bottomLeftRadius="25dp"
android:bottomRightRadius="25dp"
android:topLeftRadius="25dp"
android:topRightRadius="25dp"/>
Resultant image:
Now I need an image similar to following one:
I've tried the follwing code:(Sorry..This is an answer.But it was not reflecting in Xml)
<corners
android:bottomLeftRadius="25dp"
android:bottomRightRadius="25dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp"/>
But it is the not the correct one.
To centre an image I tried the 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 an image at centre.But is there any other way to do it?