Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build an Interactive Story App (Retired) User Input Introducing ImageViews

Android studio 2 2 please help

Hello.

i have Android studio 2.2 and it dont have all the drawable files only one file...how i import all those images in android studio 2 2? please help!

5 Answers

Adam Sawicki
Adam Sawicki
15,967 Points

It's true because by default there is only one file "drawable" without any resource qualifier. To place your images you have 2 ways. You can put all your images in this file or you can create separate files with resource qualifiers if you have prepared images for various screen densities.

i think i will use the second suggestion,but how i create separate files with resource qualifiers how i do this?

Adam Sawicki
Adam Sawicki
15,967 Points

There is really nice tool to create those directories in Android Studio. Just right-click on res, then New -> android resource directory. There choose as resorurce type : drawable, from available qualifiers choose Density and from drop down choose density you want. After clicking OK the appropriate folder is in your project.

Notice that it is not visible in Android structure of folders list, because in this "mode" all drawable folders are packed into one folder but they exist separately in project structure.

Dude thank you very very very much you gelp me a lot!! :)

Adam Sawicki
Adam Sawicki
15,967 Points

To create folder with resource qualifier you simply create folder named with following convention : /drawable-mdpi, /drawable-hdpi, / drawable-xhdpi etc. for more information please look here

i need to do it on the android sutdio or in windows?

Adam Sawicki
Adam Sawicki
15,967 Points

I'm happy ;) Best Answer selected would be nice ;)

Mohamad Fadhli Ismail
Mohamad Fadhli Ismail
11,935 Points

Sorry I'm late to the party. Actually you can just paste all the folder you downloaded into res folder and delete the drawable folder