Replaced PreferenceActivity with PreferencesFragment and used PreferencesActivity to call Fragment from MainActivity