3

I reached this thread: https://stackoverflow.com/a/9357813/853836 explaining how to use public.xml resources.

It can help me with my current task so I decided to create a project to explore, adding:

strings.xml

<resources>
    <string name="app_name">My Application</string>
    <string name="string1">String 1</string>
    <string name="string2">String 2</string>
    <string name="string3">String 3</string>
</resources>

public.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <public type="string" name="string3" id="0x7f040002" />
</resources>

But the generated R file seems to ignore the public.xml config. Where is the problem?

public final class R {
     ...
    public static final class string {
        public static final int app_name=0x7f070000;
        public static final int string1=0x7f070001;
        public static final int string2=0x7f070002;
        public static final int string3=0x7f070003;
    }
}
Community
  • 1
  • 1
Addev
  • 31,819
  • 51
  • 183
  • 302

0 Answers0