kmell96
kmell96

Reputation: 1465

Android Studio 3.2 Add Image Of Custom Size (not icon)

When I right-click the Drawable folder and click New -> Image Asset, I'm presented with only four options: action and tab bar icons, launcher icons, launcher icons (legacy), and notification icons.

What if I want to add an image to just use in my app (not as a tiny icon)? Selecting any of the options above causes Android Studio to scale the image down to like 24x24dp when I want to display it at 100x100dp. So, when I display it, it looks really blurry. Why isn't there an option to add an image asset that's not tiny?

Upvotes: 1

Views: 1010

Answers (2)

TheWanderer
TheWanderer

Reputation: 17834

Just copy the image to your drawable folder in the Android sidebar view. Make sure it goes into drawable and not one of the density-dependent folders, and you'll have an image with a custom size.

Be aware that images can't be too big in Android. It shouldn't be larger than 1600px in either dimension, otherwise you run the risk of a laggy interface or an OutOfMemory error.

Upvotes: 2

navylover
navylover

Reputation: 13539

Limited modification is to comply with the material design specification. you could use vector asset if you want to get different size image.

enter image description here

and notice you should down image with SVG format, read the ref in here

another way is using thrid party plugins like Android Drawable Importer, which is flexiable and simpler.

Upvotes: 2

Related Questions