You must use ShapeDrawable for the background of the component to which you want to add style.
The processed form is created in XML with the following syntax (this shows a rounded rectangle, but there are many possibilities that you can do to customize it to see how you want). This file (named background_square.xml or something else) should be placed in your folder:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="5dp" />
<solid
android:color="@color/primary_grey" />
</shape>
, , XML:
android:background="@drawable/background_square"