0

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.

bolov
  • 72,283
  • 15
  • 145
  • 224

1 Answers1

0

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

Joaquín
  • 1,116
  • 1
  • 10
  • 26
  • Thank you! As a follow up, if I do push ahead with Android Studio 1.4.0, will my app still run on later Android devices, or will I run into trouble? –  Jul 06 '18 at 00:28
  • your app only will work at max version in AS 1.4.0 though at that moment it was android 5.1 or something similar, if you have a device with a higher version it will not work. if it is the answer you was expecting please mark as answered. @Aneyth – Joaquín Jul 06 '18 at 00:43
  • Thanks - I'm running Marshmallow (6.0?) successfully now I believe...is that what you mean? @JoaquinAlvarez –  Jul 06 '18 at 01:06
  • In AS 1.4.0 max API when creating a project is 21 https://developer.android.com/about/versions/android-5.0 and it's android 5.0, it should not work in android 6.0 but i really don't know, Im really recomendig you to upgrade your AS, it will be much more simple to you :P – Joaquín Jul 06 '18 at 01:10
  • Ok, good to know. This might just be me being stupid - my Android emulator right now is API 23, so maybe it will work? I'm going to get a handle on app building here first regardless, but I guess I should probably switch eventually. –  Jul 06 '18 at 01:47