Currently my SwitchCompat
looks like the image below (the top portion), however I need to have visible text in OFF state.
How would I achieve this?
Currently my SwitchCompat
looks like the image below (the top portion), however I need to have visible text in OFF state.
How would I achieve this?
Are you using background images? if it does you need set text on images not on switch.
<android.support.v7.widget.SwitchCompat
android:id="@+id/autoLocation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="@color/colorPrimary"
android:checked="false"
android:paddingBottom="10dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="10dp"
android:text="@string/autoLocation"
android:textColor="#ffffff"
android:textOff="Off"
android:textOn="On"
android:textSize="20sp"
app:showText="true" />