So far I have managed to customize a switch from xml following instructions based on this stackoverflow question. However, I need to set thumb/track drawables programmatically.
Documentation on Android Switch class, makes it clear that the following methods
setThumbResource(int)
setThumbTextPadding(int)
setTrackResource(int)
will only work on android API level 16 and above. Is it feasible to achieve the same results, i.e. set thumb resource programmatically for API levels 14 and 15? If yes, how?