Refactored to use a PreferenceFragment instead of a PreferenceActivity