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 6167305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:29:19+00:00 2026-05-23T22:29:19+00:00

My question is similar to this one , but is different enough that I

  • 0

My question is similar to this one, but is different enough that I am going to post a new one.

I am writing an image viewer that downloads a PNG from a remote server, saves it to storage, and then opens it in a WebView so that I get multi-touch zoom for free. These images are usually going to be documents, so the user will want to be able to zoom in very far. I am sending down images of sufficient resolution to enable this, but the WebView seems to be “helping” me by scaling my image to the screen size to start out with. This means that my image is much too low resolution to be properly zoomed in on.

I have searched around for this, and I have found some other people encountering a similar problem, but the only possible solution I found was to cut the image up into tiles and reassemble them using HTML before loading it in the view. This seems like a kludge, and I am asking the StackOverflow hivemind if anyone has either a way to turn off that scaling, or an alternative method to get what I need.

The code that initializes the WebView:

viewer = (WebView)findViewById(R.id.activity_imageviewer_webview);
viewer.setBackgroundColor(0);
WebSettings settings = viewer.getSettings();
settings.setJavaScriptEnabled(false);
settings.setBuiltInZoomControls(true);
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);

The code that loads the image into the WebView:

viewer.loadUrl(Uri.fromFile(imageFile).toString());
  • 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-23T22:29:22+00:00Added an answer on May 23, 2026 at 10:29 pm

    We ended up solving this the hard way, by using the tiling method. We split the image up into vertical slices on our server, then send them down to be reassembled using HTML on the client before putting it into the WebView.

    It seems to work reasonably well, actually. The graphic is definitely higher quality, and one can easily read the text in it. The only issue we’ve seen is that there is a performance hit for panning and zooming that for reasons unknown to me (yet) is extremely bad only on the Nexus S.

    Until something else changes, I think this may be the only solution to the problem without writing a custom view control.

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

Sidebar

Related Questions

This is similar to one of my other questions, but different enough I think
Similar to this question but with a difference subtle enough that I still need
I already asked a similar question but this one is a bit different/specific: I'm
Rails 3.1, ActiveAdmin 0.3.4. My question is somewhat similar to this one but different
My question is similar to this one but none of the answers solve my
my question is similar to this one , but I don't want to use
This question is similar to this one, but with an extra wrinkle: Auto-removing all
My question is similar to this one , but I would like to replicate
My question is similar to this one , but I can simplify it some.
The question is quite similar to this one , but I need to concentrate

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.