Switch to preferencefragment as the other way is deprecated