0

I need to maintain an xml file to save/update/customize the configuration of application , in my project folder. I am saving the file to the 'raw' folder inside 'res'. my data inside this config file is like

`<?xml version="1.0" encoding="UTF-8"?>
<Manual>
<Configs>
    <Config name="image" category="jpeg"/>
    <Config name="text" category="pdf"/>
</Configs>
</Manual>`

i need to add the entries to the xml file like how we can add to strings.xml file in res folder.

enter image description here

when i am trying to add items like this i am not getting any list of elements like the above popup dialog. How can i add my custom elements and make entries to my custom xml file.

i need type of item 'Config' and there should be two fields to enter the 'name' and 'category'.

when i am trying to add i can add custom attributes directly

enter image description here

Arundas K V
  • 801
  • 2
  • 14
  • 28

1 Answers1

0

//you need to add custome attributes in attrs.xml

<resources>
   <declare-styleable name="PieChart">
       <attr name="showText" format="boolean" />
       <attr name="labelPosition" format="enum">
           <enum name="left" value="0"/>
           <enum name="right" value="1"/>
       </attr>
   </declare-styleable>
</resources>

Define Custom Attributes follow this link

Padma Kumar
  • 19,893
  • 17
  • 73
  • 130
  • theses attributes can only use in layout xml files right? How can i use these attributes in the xml files like (strings.xml) above screenshot – Arundas K V May 15 '14 at 12:19