Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

How can we choose the resolution of an image we add to an imageview element?

+4 votes
When I resize an image using the min height / width values in the properties window, I see that the image displayed is the low-res version and is pixelated.  I want to be able to choose the high resolution version for an image if I make it larger on the screen.
asked Mar 11, 2015 in Spring 2015 by Ethan Halsall (100 points)

1 Answer

+4 votes
The problem is that I MISLED you today -- it appears that the "New -> Image Asset" wizard should really just be used for creating launcher icons (and a few other things)... and NOT for importing general purpose images into your project, because it always resizes them to a small "icon" size, so they look blurry if you size them bigger.

It looks like the appropriate way to do this is to change to the "project" view, browse to "app/src/main/res/drawable", and then drag your .PNG file (from outside Android Studio) directly into there.  It should then be available as a high-resolution resource... just refer to it by name in your imageView widgets.

(You should rename the image file to be all lowercase with underscores instead of spaces, so it's a proper resources name.)
answered Mar 11, 2015 by Forrest Stonedahl (100 points)
...