Mick
Mick

Reputation: 7957

xml files in drawable directory? Surely some mistake?

I am attempting to get and advertisers system incorporated into my android app. There are a selection of files (within a tree of directories) that I have been instructed to copy into my projects resources folder. Most of the files & directories make sense... except for the fact that inside their "drawable" directory they have a selection of XML files (along with the expected PNG files). To me this looks like a cock-up. Surely all the XML files should be within the "layout" directory?

Upvotes: 1

Views: 660

Answers (1)

Marcin Orlowski
Marcin Orlowski

Reputation: 75645

No, it's perfectly valid. You can have XML drawables see docs about this here - read about it - these are quite powerful and flexible. Moreover, you should avoid putting other types than XML based drawables into res/drawables folder. All the bitmaps should be stored into res/drawables-<QUALIFIER> (i.e. res/drawables-hdpi, res/drawables-mdpi etc folders).

Upvotes: 3

Related Questions