Search code examples
androidandroid-layoutandroid-preferences

Where should a Preferences .xml file go?


When I created a preferences xml file (by right-clicking the project name, selecting | New | Other | Android XML File, and then selecting "Preference" from the "Resource Type" spinner in the "New Android XML File" dialog), it saved it in res/xml rather than res/layout. Is this as it should be?


Solution

  • Yes, the preference xml file should be in the res/xml directory.

    The res/layout directory, as the name suggests, is only for layout xml files.