Reputation: 9039
I've a round shape like this
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorAccent" />
<corners android:radius="4dp" />
</shape>
and I'm using it as background for buttons
<Button
android:id="@+id/button"
android:layout_width="84dp"
android:layout_height="34dp"
android:layout_below="@id/like"
android:layout_marginTop="14dp"
android:background="@drawable/button_shape"
android:textColor="@color/white" />
and in android studio preview it showing a round button
but In application I'm getting this
How can I fix it?
Upvotes: 0
Views: 1271
Reputation: 9039
I forgot to check the java code which I was setting color as background of button and after removing that part of code it's working great
Upvotes: 0
Reputation: 1881
Try to define each corner separately...
Instead of raduis
define all: bottomLeftRadius, bottomRightRadius, topLeftRadius, topRightRadius
Upvotes: 0