问题
(we all know) There are three parts in android Switch Widget ... Text - Thumb - Track.
My question is how can we completely remove this text part if we don't want to use any text
because it's ruining the balance of the layout

回答1:
You simply have to not provide any text:
<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
回答2:
Use negative margin for the switch as follows and see if it works:
<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="-10dp" />
I know some people consider it a bad practice to use negative margin but right it seems to be the easiest way.
You can set margin programmatically as well based on device type.
来源:https://stackoverflow.com/questions/25292103/removing-whitespace-in-android-switch-which-is-devoted-to-text