I'm an Eclipse developer and recently switched to Android Studio.
I know that "drawable" folder is where I must upload all the images I'm going to use in my Android project but, what happens with the image sizes? In Eclipse there are different folders for each size (xxhdpi, xhdpi, hdpi...)
What method should I use now to get the best compatibility with images and devices?
Thanks.
In Android Studio inside the res folder, one can find the drawable folder, layout folder, mipmap folder, values folder, etc. Among them, the drawable folder contains the different types of images used for the development of the application.
1) The reason behind the different drawable folders - to enhance user experience when using our app, by accomodating each device's screen density. 2) "Where should I store ..." - ideally, you store an image with the appropriate size for each screen density that exist.
Supported file types are PNG (preferred), JPG (acceptable), and GIF (discouraged).
A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon . There are several different types of drawables: Bitmap File.
In Eclipse there are different folders for each size (xxhdpi, xhdpi, hdpi...)
They are there in Android Studio too. The Android Tools team kinda hid them.
If you look just above the project explorer tree thingy on the left, you should see a drop-down, one that probably says "Android" right now:
That is the Android project view, one that gives you a somewhat synthetic look at your project, collapsing things like resource sets and sourcesets to hide those details.
Eclipse users will probably be happier with the classic project view, which you get by clicking that drop-down and switching it to "Project":
This works much like Eclipse's Package Explorer, where you get an actual filesystem view of what's going on, complete with resource set directories.
It's all the same stuff on the filesystem, but the Android project view masks it a bit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With