Tuesday, January 31, 2012

Custom PreferenceActivity

To customize appearance of PreferenceActivity, simply declare XML layout with whatever layout you want to add and also add a ListView with id = @android:id/list which will be replaced by Preference layout. In your PreferenceActivity just call both setContentView(the custom layout) and call addPreferencesFromResource(preference XML);