An API I hit returns a URL to an image. I want to use a WebView, feed it this URL and have it display the image. However, I want the WebView to be a static 90dip x 90dip (images are square). The images are bigger than 90px. Is there a way I can tell the WebView to size the image to its own dimensions?
Share
Have you tried it yet? Does it not work, if not what does it do instead?
I think you could use an ImageView to display the image with no problems. You can use a method like this to return to you a Drawable object from a url, which you can then set to the ImageView with
setImageDrawable(img);ImageView’s I know for a fact you can set to a static size (90dip x 90dip) and it will handle scaling the image down if need be to make it fit in that size, WebView might try to make it scrollable or something, I am not sure.