Skip to content

Render ACS pages at their native viewport instead of auto zooming in#46

Open
jim-daf wants to merge 1 commit into
LivotovLabs:masterfrom
jim-daf:fix/disable-auto-zoom-issue-19
Open

Render ACS pages at their native viewport instead of auto zooming in#46
jim-daf wants to merge 1 commit into
LivotovLabs:masterfrom
jim-daf:fix/disable-auto-zoom-issue-19

Conversation

@jim-daf

@jim-daf jim-daf commented Apr 22, 2026

Copy link
Copy Markdown

Render bank pages at native scale

Resolves #19

When the ACS page opens, the WebView ignores the page viewport and renders
the body at the default WebView scale, which makes the form appear zoomed
in. The fix is to enable wide viewport plus overview mode so the page is
first laid out at its declared width and then scaled to fit the WebView.

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

Pinch to zoom still works because setBuiltInZoomControls(true) is kept.
Users who actually want to zoom in can still do so manually, the page just
no longer starts off zoomed in.

Testing

Verified against a Visa sandbox ACS page on a Pixel 6 emulator. Before the
change the form opened roughly 2x. After the change it opens at the same
scale a desktop browser would render it.

Enable wide viewport plus overview mode so the ACS page is shown at
the scale its own viewport meta tag asks for. This stops the WebView
from forcing an enlarged view of the form.

Fixes LivotovLabs#19
@jim-daf jim-daf marked this pull request as ready for review April 22, 2026 18:38
Copilot AI review requested due to automatic review settings April 22, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the D3SView WebView configuration so ACS/bank challenge pages respect their declared viewport and don’t initially render “zoomed in,” addressing Issue #19.

Changes:

  • Enable useWideViewPort to make the WebView honor the page’s viewport width.
  • Enable loadWithOverviewMode so the content is initially scaled to fit the WebView while still allowing pinch-to-zoom.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

private void initUI() {
getSettings().setJavaScriptEnabled(true);
getSettings().setBuiltInZoomControls(true);
// Render bank pages at their native scale so they are not auto zoomed in.

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says “native scale”, but setLoadWithOverviewMode(true) typically scales the page to fit the WebView (after honoring the page viewport) rather than preserving a true 1:1 “native” scale. Consider rewording to something like “Respect the page viewport and fit the content to the WebView to avoid starting zoomed in” to avoid misleading future readers.

Suggested change
// Render bank pages at their native scale so they are not auto zoomed in.
// Respect the page viewport and fit the content to the WebView to avoid starting zoomed in.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow auto-zoom in 3dsDialog

2 participants