Okay after a little research and best practice you surely need a Layerlist
as a background for your Button
(though even a TextView
will work i.e it is also clickable like any view).
SOLUTION:
You will have to open the drawables
folder and add a drawable resource called lets say custom_button_background
then use this layerlist inside it:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="#000000" />
</shape>
</item>
<item android:top="20dp" android:bottom="20dp" android:left="20dp" android:right="20dp">
<shape>
<solid android:color="#ffffff" />
</shape>
</item>
<item android:right="80dp">
<shape>
<solid android:color="#ffffff" />
</shape>
</item>
<item android:top="80dp" android:bottom="80dp">
<shape>
<solid android:color="#ffffff" />
</shape>
</item>
</layer-list>
Then we are done! This will be our background, In my Android studio the Preview for this look like this:

You can adjust the values to reduce them to your needs. To set this as your Button
or any View
you simply add this attribute to it:
android:background="@drawable/custom_button_background"
Just adjust the measures to fit your Button Size!