For a switch
, add this to your styles.xml
file:
<style name="x" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">#33CCFF</item>
</style>
Two options:
add this to your layout
XML
file:android:switchTextAppearance="@style/x"
add this to your Activity class after you've created an instance of your
switch
:switchInstance.setSwitchTextAppearance(getActivity(), R.style.x);
Note: path to styles.xml
file: Project Folder > res > values > styles.xml