How to solve this problem? theres a gap between icon and switch button.
Image 1 : Before
<androidx.appcompat.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/baseline_dark_mode_24"
android:drawableEnd="@drawable/baseline_light_mode_24"/>
Image 2 : After
I already changed the value of drawablePadding to negative one.. but drawableEnd still got stacked with Switch Button.
<androidx.appcompat.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:minHeight="0dp"
android:drawablePadding="-12dp"
android:drawableStart="@drawable/baseline_dark_mode_24"
android:drawableEnd="@drawable/baseline_light_mode_24"/>
Image 3 : with LinearLayout
There's still gap 'ight there
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/baseline_dark_mode_24" />
<androidx.appcompat.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/baseline_light_mode_24" />
</LinearLayout>


