Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Subdirectories in drawable directory  RSS feed

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to know why I watch the error cannot resolve symbol @drawable if I have an image in several resolutions and saved them in the following subfolders:

drawable-hdpi, drawable-mdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi

These subfolders are in drawable folder.

Here is the xml file:



usr_imagen is a png file that is stored in several resolution in the subfolders mentioned above. The error is fixed if I copy one image of the subfolders in the drawable folder.
But if only one file is in the drawable folder, all the resolutions of screens are not covered and the image won't be displayed right.

How can I display the image for all resolutions correctly?

Thanks.
 
Rancher
Posts: 1876
15
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The folders drawable-hdpi and all others those you mentioned, should go under res not under drawable.
 
Have you no shame? Have you no decency? Have you no tiny ad?
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!