user468311
user468311

Reputation:

Statelist drawable for different resource types

I've got resources for different screens in drawable-ldpi, drawable-ldpi, drawable-mdpi. Where should I place Statelist file? I mean, that xml could be one for all types of resources, so in what folder shoudl I place it?

Upvotes: 1

Views: 295

Answers (2)

Lavanya
Lavanya

Reputation: 3913

can create a folder named drawablein resfolder and you can place your statelist.xml in that so that it can be used.

Upvotes: 0

rekaszeru
rekaszeru

Reputation: 19220

You can create a folder inside /res: drawable, and put your state list xml in that folder.
It can be referenced as R.drawable.your_state_list.

This way you will have only one xml which will be used for all the resolutions.
If you have other common drawables, you can place them here too.

Upvotes: 2

Related Questions