SMGhost
SMGhost

Reputation: 4037

Android WebView content scaling

I have same applications on two devices with different screen sizes, one is 1024x600(180dpi), another is 1280x800(213dpi). This app contains webview with dimensions specified in pixels. On first device it is a little smaller. The problem is that when I load my custom html page, on first device with smaller screen and webview the page is rendered correct, but on second device with bigger screen and bigger webview, it doesn't fit. I expected page to fit the second webview following white spaces, because page is fixed size and second device screen is bigger. How to fix this?

Upvotes: 0

Views: 606

Answers (1)

SMGhost
SMGhost

Reputation: 4037

Html had this line:

<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0" />

It was the reason why setInitialScale() didn't work at first.

Upvotes: 2

Related Questions