You can easily customize your switches to look like these.
In styles.xml
add this :
<style name="App.Switches" parent="Widget.Material3.CompoundButton.Switch">
<item name="track">@drawable/switch_track</item>
<item name="android:thumb">@drawable/switch_thumb</item>
</style>
switch_track.xml
:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#000000" />
<corners android:radius="56dp" />
<size
android:width="64dp"
android:height="28dp" />
</shape>
</item>
</layer-list>
switch_thumb.xml
:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:bottom="4dp"
android:left="4dp"
android:right="4dp"
android:top="4dp">
<shape android:shape="oval">
<solid android:color="#000000" />
<size
android:width="20dp"
android:height="20dp" />
</shape>
</item>
</layer-list>
In the end add this line in your app's main theme to apply this style to all the switches in your app :
<item name="switchStyle">@style/App.Switches</item>