I want to make a round button in Android Studio. I have created a separate xml that I saved in drawable called round_button.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#cccccc"/>
<stroke android:width="2dp" android:color="#000000" />
</shape>
Then I used it in my button function.
<Button
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/round_button"
android:text="ME"
android:id="@+id/button7"
android:layout_below="@+id/textView4"
android:layout_centerHorizontal="true"
android:layout_marginTop="119dp"
android:layout_alignParentEnd="false" />
The problem is that my round button seems to be inside a square shape. How can I get rid of it? Any ideas?