Take the 2-minute tour ×

I'm trying to understand why it has been decided to have both values and xml subfolders in the res Android application folder.

While I can see the semantics differences between, say, drawables and anim and values (for those hold objects of different natures) I fail to see difference between xml and values for xml data seem to be values.

(And, moreover, 'xml' seem to describe the form of data representation not the nature of data (most of the res data are in the form of xml))

Could someone give an insight?

share|improve this question
This may help you: stackoverflow.com/questions/4761406/… –  fiddler Nov 9 '12 at 8:13
I'm downvoted because my question is... ? :) –  Alex Nov 9 '12 at 8:25
Don't know, but I upvoted it cause I've had this question in mind since a long time :) –  fiddler Nov 9 '12 at 8:30
Another upvote to restore the natural balance of the Androidverse. Perfectly reasonable question. The key to me is that XML and values are arbitrary. Out of habit (because when I did my first project using embedded XML I didn't know about res/XML) I put my XML in res/raw since I know that Android never futzes with it. I know of no solid reason to use one or the other except to help manage your project structure. –  Simon Nov 9 '12 at 8:58
add comment

1 Answer

up vote 1 down vote accepted

values should usually hold files that contain separate values not tied with each other, like strings, dimens or colors. xml should hold files that can be considered as a whole, like app_widget_provider or search_provider files. This is the only difference I can think of.

share|improve this answer
add comment

Your Answer


