23 Jul 2013, 14:49
Generic-user-small

Sunny Sabharwal (2 posts)

i have pdf version 2010-7-16. on this page under section 3.8(adding settings) there is a statement “You define the preferences in a resource file called res/xml/settings.xml”.

IAm using adt version 21.1.0. Also iam creating the sudoku app for 4.2.2 JB. Here in the directory structure there is no folder named ‘xml’. Where to create the setting.xml file? Iam Stuck here.. Iam i wrong somewhere?? –Sunny Sabharwal

24 Jul 2013, 07:39
Generic-user-small

Anthony Shaw (131 posts)

Right click on the res folder and select New->Folder and name the new folder xml. Once the xml folder is created you can creating the settings.xml folder in there.

31 Jul 2013, 20:29
Generic-user-small

Sunny Sabharwal (2 posts)

well i tried but in Prefs.java file ,

addPreferencesFromResource(R.xml.settings);

is striked out and it says

The method addPreferencesFromResource(int) from the type PreferenceActivity is deprecated.

whats wrong?

01 Aug 2013, 07:17
Generic-user-small

Anthony Shaw (131 posts)

Yes, that method is deprecated in the version of Android that you are building against. You can safely ignore that message for now and carry on.

  You must be logged in to comment