IDK
IDK

Reputation: 127

Flash Animate - Webview Scale/Zoomfactor

so i have a question about open websites with the webView.loadURL function. On ios the scale factor seems to be perfect, and the page fits perfect to the Rectangle I create to visualize the page. But if i create a build for andorid, the website opens with the maximum of zoom, so I have to tap into the screen and zoom out to see the complete page.

Has someone an idea how to determine the automatic zoom on android? It would be great if I load the page, and it would be showed completely, without a zoomfactor like on ios.

To change the size of the rectangle wouldn't be a solution, because I have a fix size, and I need to keep it.

Best regards and thanks a lot!

Upvotes: 0

Views: 156

Answers (2)

Raul Martin
Raul Martin

Reputation: 561

Hopefully it is not too late and hopefully this time it will be useful. Try adding an element into the dom like this:

var webView:StageWebView = new StageWebView();

webView.viewPort = new Rectangle( 0, 0, this.stage.stageWidth, this .stage.stageHeight); 

webView.stage = this.stage; 

var htmlString:String = "<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>";

webView.loadString( htmlString );

Upvotes: 3

Raul Martin
Raul Martin

Reputation: 561

If you can access the source code of the website, try to write this: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />

Upvotes: 1

Related Questions