Android Studio 0.4.0
Hello,
I want to add a new Preference Screen in Android Studio. However, I cannot find the menu option to do it.
I
Try this in Android Studio 1.0.2. File ->New->Other. Select Activity->Settings Activity. Follow the wizard to add it to your application.
The preference option doesn't exist anymore. You will need to right click the res
->new
->Android resource file
and choose the resource type as xml
in the dropdown. Then you will manually need to add the layout for preference xml.
What I just did was creating a new "Android resource directory" res->new->Android resource directory. There you choose xml, which creates the xml folder. Right click on this xml folder -> new -> XML resource file and then it proposes Preference Screen.
(For Windows, go to File > Settings > Editor > General) (For Mac, go to Android Studio > Preferences > Editor > General)
In Android Studio 1.1.0: If you create a SettingsActivity it automatically sets up some xml preference resource files for you.
Note: The Activity uses some deprecated code. It might be best to look at the latest documentation for creating a preferences activity: http://developer.android.com/reference/android/preference/PreferenceFragment.html and for creating the XML resource file: http://developer.android.com/reference/android/preference/Preference.html
In Windows, Go to Settings Then Double Click on Editor