Skip to main content

Drawable folders in res folder?



What is the difference between the three drawable folders in the res folder in the project hierarchy? If I have an image to put into a folder, which folder do I put it in?





Source: Tips4all

Comments

  1. I am going to take a guess that "the three drawable folders" are drawable-ldpi, drawable-mdpi, and drawable-hdpi. In that case, if you stick with all of those folders, you need to put one image in each, sized to match the indicated screen density. This is discussed in the online documentation as well as this blog post. You can find a set of sample projects showing use of different drawable resources based on screen density here.

    If you are just starting out in Android development, you can get rid of all three of those directories and create a single drawable directory, putting your image in there. Eventually, though, for a quality application, you will want to test your images on different devices/emulators with different screen densities, and possibly have different images for each density to improve the look of your app.

    ReplyDelete
  2. Here is a reference to multi device options.

    As said by @CommonsWare, you don't need to put resources in anything but res/ layout/ or drawable/ but if you want you're program to have a better experience on multiple devices with different screens / density / languages you may want to consider what you can do.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?