Search code examples
androidpreferencesandroid-preferencesandroid-xml

Unable to add Preferences.xml (Android Preferences in XML)


Hopefully, this is a newbie question with a quick answer...

I am attempting to add a simple preferences file in a new Android project (New -> Android XML File), but it doesn't appear to be working correctly.

There is no root element to choose from when I select the Preference type layout. If I press Finish, it doesn't do anything. See screenshot below.

Thanks, wTs

alt text


Solution

  • Just create a normal xml file to the project /res/xml/ folder and add your content to the file as usual. Should work just great. Eclipse detects it as a preference file once you have added the preference-xml and saved it.