Adding drawableEnd to a SwitchCompat in Android

189 views Asked by At

I am working on an Android app in which I want to have a SwitchCompat with a drawable shown between the switch text and the switch toggle view as shown below.

Intended switch

For that, I thought android:drawableEnd would work fine, but contrary to my expectations, it places the drawable to the end of the switch toggle as shown below.

Actual switch

Is there any way I can achieve this effect except for showing the drawable between a separate TextView for the text and a separate SwitchCompat for the toggle?

0

There are 0 answers