Wonko the Sane
Wonko the Sane

Reputation: 10813

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

Upvotes: 0

Views: 2071

Answers (3)

Specur
Specur

Reputation: 3240

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.

Upvotes: 1

ekawas
ekawas

Reputation: 6664

try refreshing the folder that the file is supposed to be in (in your example res/xml).

Upvotes: 1

Falmarri
Falmarri

Reputation: 48577

You don't need to have a root element in the selection screen. Just replace whatever eclipse generates with what you want.

Upvotes: 1

Related Questions