Toggle switch with listener classes and interfaces