1

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?

Alexander Kulyakhtin
  • 47,782
  • 38
  • 107
  • 158
  • 1
    This may help you: http://stackoverflow.com/questions/4761406/complete-list-of-all-android-resource-folders – sdabet Nov 09 '12 at 08:13
  • I'm downvoted because my question is... ? :) – Alexander Kulyakhtin Nov 09 '12 at 08:25
  • Don't know, but I upvoted it cause I've had this question in mind since a long time :) – sdabet Nov 09 '12 at 08: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 09 '12 at 08:58

1 Answers1

1

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.

Egor
  • 39,695
  • 10
  • 113
  • 130