Android Studio. Portfolio and file sizes?

I am an Eclipse developer and have recently switched to Android Studio.

I know that the drawable folder should load all the images that I am going to use in my Android project, but what happens with image sizes? Eclipse has different folders for each size (xxhdpi, xhdpi, hdpi ...)

Which method should be used for better compatibility with images and devices?

Thanks.

+8
android image folder drawable
source share
3 answers

Eclipse has different folders for each size (xxhdpi, xhdpi, hdpi ...)

They are also in Android Studio. The Android Tools team hid them.

If you look just above the project explorer tree on the left, you'll see a drop-down list that probably says β€œAndroid” right now:

Android Studio, Android Project View

This is an Android project view that gives you a somewhat synthetic look at your project, folding things like resource sets and sources to hide these details.

Eclipse users are likely to be happier with the classic look of the project that you get by clicking this drop-down list and switching it to β€œProject”:

Android Studio, Classic Project View

This works just like the Eclipse Package Explorer, where you get the actual file system view of what is happening, complete with resource set directories.

All this applies to the file system, but the Android project view masks it a bit.

+13
source share

Right click drawable β†’ New β†’ Image Asset β†’ Asset Type: Action Bar and Tab Icons . Image file: image_path , Resource Name: how_youre_image_will_be_called β†’ Next β†’ Finish

Done

This will add 4 different image sizes to fit the size of the device (phone, tablet ...)

You can also ctrl+c β†’ ctrl+v set the folder and select the desired size (mdpi - phones, xxhdpi - tablets ...), but it will not change the size by device type

+8
source share

The studio automatically creates a klasor image. just suld do it like this. ic_launcher 36 * 36 ic_launcher 48 * 48 and other image sizes. But one thing has changed. Now ldpi does not create.

0
source share

All Articles