Android PreferenceScreen

  1. Home
  2. chevron_right
  3. Solutions
  4. chevron_right
  5. Android PreferenceScreen

If you encounter this problem: “CheckBoxPreference is not allowed here” or other preference tag and your xml file is all red is because you create the xml in res/layout and you must create it in res/xml.
So you have to make a new directory in res called “xml” and this is where your preferences xml will be created. Here is a tutorial.

Menu