In my Android app, I used the toggle button. Is there a way to hide the text of a toggle button? There is an option to hide (API: showText) for API level 21, but I need to run it on lower level devices.
Here is my xml file:
<Switch android:layout_width="100dp" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_marginTop="7dp" android:background="@drawable/offbuttonbg" android:textAppearance="@style/SwitchTextAppearance" android:thumb="@drawable/switchselector" />
android switch-statement button
Madhu
source share