androidandroid-studiopixel-density

Standardized image sizes on android


So I'm trying to build a basic app on Android Studio 1.4.0. Yes, I know it's old, but being pretty new to app-building and having found a tutorial I thought I'd go with it.

My question: I put an image into "@drawable." How do I make sure it resizes when I select different emulators? Should I use "@mipmap?" If so, how exactly would I do that? I have different sizes for my image (xxhdpi, etc.) but I don't know how to make it so the emulator "automatically selects" the correct image size.


Solution

  • For adding a resource to your Project use this plugin https://plugins.jetbrains.com/plugin/7658-android-drawable-importer

    You add your img on one size example xxxhdpi and it automatically make all the resizes, then you only set @drawable/yourimage in the ImageView for example and it selects automatically the image needed for that size

    And also I highly recomend you to use at least android studio 2.7+, when you decide to actualize after tutorial you'll encounter a lot of differences and too many methods deprecated