I\'m trying to use a SwitchPreference in my Settings page, but i can\'t get the listener to work. I am using a custom widget layout in order to style the switch, as I cannot
Solution – based on @RickCase answer, but works with both Switch and SwitchCompat.