tags:

views:

28

answers:

1

Hi all

I have two resources file in res/values directory: string.xml and names.xml

how can I retreive all resources from names.xml only

the method

Field[] x=R.string.class.getFields();

retrieves resources from both files.

how can this be acheived

thanks

+1  A: 

I am sorry, but that is not possible. It does not matter that you have your strings split between multiple named resource files -- Android combines them all when it compiles your project.

You are welcome to use prefixes or something to identify one set of strings from another. I do that with the support code for the Android Parcel Project, to allow reusable components to each define strings without one overwriting the strings of another.

CommonsWare
Thanksyou are right.I used prefixes to distinguish between resources
Mina Samy