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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![yadin michaeli](https://uploads.teamtreehouse.com/production/profile-photos/6287372/micro_image__2_.jpg)
yadin michaeli
Courses Plus Student 5,423 PointsDifferent Densities
Hello.
I have android studio 2.2 and all those different densities in my res folder but how i can display image in layout with those different densities?
in android studio 2.2 has different way please help!
1 Answer
![Seth Kroger](https://secure.gravatar.com/avatar/b5bdc43c1e576145fb404edba6fea5a6?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Seth Kroger
56,413 PointsThere is no need to specify the density of the image at all. If you have the different densities correctly added to res it will automatically choose the best density for the device it's displayed on. (all the drawable-*dpi folders alongside drawable in file explorer or Project>Project view, in Project>Android it will show (x) variations of each drawable) You just need to refer to it by the base drawable name ("@drawable/name" or R.drawable.name)
yadin michaeli
Courses Plus Student 5,423 Pointsyadin michaeli
Courses Plus Student 5,423 PointsOh ok thank you very much!