I've tried using android:background="@color/colorWhite"/> but it changes the entire background of the switch not that small grey part.
<androidx.appcompat.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="16dp"
android:layout_centerVertical="true"
android:background="@color/colorWhite"/>
android:backgroundTint doesn't do anything either


The background is called a
trackand you can change the color of it by usingapp:trackTint="@color/darkThemeGreyTextColor"The "button" is called a
thumband you can change the color of it withapp:thumbTint="@color/heartRed"I didn't see these attributes because I was using the
android:prefix instead of theapp:prefix to see the available options.