SwitchPreferenceCompat from https://plus.google.com/+ChristianGollner/posts/badausxo1J6