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

  • Home
  • SEARCH
  • 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 7841223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:03:22+00:00 2026-06-02T16:03:22+00:00

What combination of META tag settings in HTML and WebSettings in Java should I

  • 0

What combination of META tag settings in HTML and WebSettings in Java should I use to get the following result: window.innerWidth in Javascript should be always (in any Android version and on any device) equal to the WebView width in pixels.

For instance, I set the WebView width to 1024px. In Android AVD emulator, window.innerWidth is equal to 683px (2/3 of 1024, or 150% scale).

I tried the following META:

<meta name="viewport" content="width=device-width;
user-scalable=no; initial-scale=1.0;
minimum-scale=1.0; maximum-scale=1.0;" />

— doesn’t work.

Then I tried:

_WebView.getSettings().setLoadWithOverviewMode(true);
_WebView.getSettings().setUseWideViewPort(true);
_WebView.setInitialScale(100);

— doesn’t work too.

Finally,

_WebView.getSettings().setDefaultZoom(ZoomDensity.FAR);

seems to be working. According to documentation, it means “100% looking like in 240dpi”. I don’t know, what dpi users device has! How to get the task done correctly?

UPDATE

I’ve just tested ZoomDensity.FAR on a high-dpi tablet — it works without it and doesn’t work with it!

Regards,

  • 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-06-02T16:03:24+00:00Added an answer on June 2, 2026 at 4:03 pm
    1. META:

      meta name=”viewport” content=”width=device-width; user-scalable=no; initial-scale=1.0;
      minimum-scale=1.0; maximum-scale=1.0; target-densityDpi=device-dpi;”

    2. Java:

      _WebView.getSettings().setLoadWithOverviewMode(true);
      _WebView.getSettings().setUseWideViewPort(true);

    This combination works.

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

Sidebar

Related Questions

What combination of html and IE8 settings get IE8 to open links in a
I'm using the combination of json_encode (PHP) and JSON.parser (Javascript from json.org) for passing
I actually use a combination of OS X, Linux and Windows, but Windows is
I've tried every combination to import binary data for Mongo and I CANNOT get
I'm using a combination of PHP and Phonegap. I use PHP to build the
html <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml> <head> <meta http-equiv=Content-Type
I used to use OpenC++ ( http://opencxx.sourceforge.net/opencxx/html/overview.html ) to perform code generation like: Source:
I have tried every combination and permutation of meta tags that are supposed to
I need to get the value of the content attribute of a certain meta
short: I need to filter all .java files and every META-INF folder from a

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.