Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6369835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:51:16+00:00 2026-05-25T00:51:16+00:00

An API I hit returns a URL to an image. I want to use

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:51:17+00:00Added an answer on May 25, 2026 at 12:51 am

    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);

     /***********************************************************
     * This method will return the image from a URL.
     * Note: This should be called from the UI thread.
     ***********************************************************/
    public Drawable getRemoteImage(final URL aURL) {
        try {
             final URLConnection conn = aURL.openConnection();
             conn.connect();
             final BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
             final Drawable d = Drawable.createFromStream(bis, "src");
             bis.close();
             return d;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I want to hit an URL and I use to get
I have no idea why my action is not being hit. This controller is
I have hit a wall on this one. My DialogFragment works well with all
I am using WPF to display the image in the clipboard. This works fine
Some API returns me XmlCursor pointing on root of XML Document. I need to
Windows API ::FindWindow function fails when called from Service application. GetLastError() also returns 0
What API or tools can I use to query the capabilities of the system
I'm consuming (via urllib / urllib2 ) an API that returns XML results. The
I have the following code, and it works fine until i hit the the
On my Windows 7 box, this simple program causes the memory use of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.