简体   繁体   English

Android 2.2上的Phonegap iFrame

[英]Phonegap iFrame on Android 2.2

THis is a issue i've on andorid 2.x ~, on 4.x seems to work fine. 这是我在ororid 2.x〜上遇到的一个问题,在4.x上似乎工作正常。

I've this application that inside has an iframe. 我有一个内部有iframe的应用程序。

The content seems to load fine and don't have problems with it. 内容似乎可以正常加载,并且没有问题。

The big issue i been trying to fix since last wensday is that the iframe ignores the size i wrote on the html, and just uses one to fit the content of the iframe content; 自上周三以来,我一直试图解决的主要问题是iframe忽略了我在html上写的大小,而只使用一个来适应iframe内容的内容; and that makes the phonegap webview stretch to iframe new width. 这样一来,phonegap Webview就会延伸到iframe新宽度。

Will try to explain in the best i can: A phone with lets say a resolution of: 320*640 The iframe content takes 760*400~ The iframe goes off screen, wich is fine i don't want to scale it or anything different, but it results that on 2.n because the iframe width is the 'content' width i can't scroll to see the rest of the iframe content so 我将尽力解释:分辨率为:320 * 640的手机iframe内容需要760 * 400〜iframe不在屏幕上,这很好,我不想缩放它或其他任何东西,但结果是在2.n上,因为iframe宽度是“内容”宽度,我无法滚动查看iframe其余内容,因此

the iframe: iframe:

 <iframe id="remoteFrame" src="'+remote_url+'" scrolling="yes" width="100%" height="100%"></iframe>

Any ideas? 有任何想法吗? Anyone else experienced this? 还有其他人经历过吗?

The trouble is not the phonegap itself. 问题不在于电话间隙本身。 Android 2.X not works fine with iframe. Android 2.X不适用于iframe。 I already tried a lot of "solutions". 我已经尝试了很多“解决方案”。

What you can do is use a plugin to open a second browser: https://github.com/purplecabbage/phonegap-plugins/tree/master/Android/ChildBrowser or send user to default browser. 您可以使用插件打开第二个浏览器: https : //github.com/purplecabbage/phonegap-plugins/tree/master/Android/ChildBrowser或将用户发送到默认浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM