Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert text inside an android switch material

Hi guys I'm trying to make the text "text_on / text_off" appear inside the thumb of the switch material. I created my own thumb, used to use the element and it worked, now I'm using SwitchMaterial and the text has disappeared. Is there a way to put "on / off" text inside the switch material?

I refer to this text:

            android:textOff="@string/no"
            android:textOn="@string/yes"
like image 269
tecn603 Avatar asked Dec 19 '25 12:12

tecn603


1 Answers

I solved it by using

app:showText="true"

instead of

android:showText="true"

like image 85
tecn603 Avatar answered Dec 24 '25 10:12

tecn603



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!