利用内幕滚动型机器人的WebView用jQuery Mobile的网络空白 [英] White spaces using android webview inside scrollview with a jquery mobile web

查看:258
本文介绍了利用内幕滚动型机器人的WebView用jQuery Mobile的网络空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Andr​​oid应用程序的布局使用滚动视图内的WebView。 (有tabhost还,但它并不重要)

I'm trying to use a webview inside a scrollview on a layout of my Android app. (with a tabhost also, but it's not important)

这件事情是这样的:

<ScrollView 
    android:layout_height="fill_parent"
    android:layout_width="fill_parent"      
    >

   <LinearLayout 
            android:id="@+id/ll1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical">                     

       <WebView 
        android:id="@+id/webview1"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"
        android:scrollbars="none"   
    />


   </LinearLayout>
</ScrollView>

问题是,当我尝试加载一个url使用jQuery Mobile的我的WebView制成,它开始成长的无限与下面的网页内容非常巨大的白色空间,和的LinearLayout和滚动型开始过长。
是否有某人与任何解决方案?

The problem is that when i try to load a url made using jquery mobile on my webview, it starts to grow to the infinite with a very huge white space below the web content, and the linearlayout and scrollview start to grow too. Is there someone with any solution?

该解决方案是不是:


  • 更改像XML布局layout_with或layout_height任何布局参数。

  • 我必须使用网页视图滚动型里面,因为我必须滚动了很多其他的事情,所以它不是一个可能性。

  • 我真的知道,这个问题来,只有使用jQuery Mobile。我试图删除网页德德jQuery Mobile的js文件,并且它去完善。

  • 另外,我知道如果我在的WebView这不是一个滚动视图里面加载这个URL,没有任何问题,所以这个问题是滚动视图,web视图和jQuery移动的结合。

非常感谢!

推荐答案

有大量的文档在ScrollViews SO有关网页视图。总之,有可能会解决'你的'设备和'你的'操作系统,但如果你的应用程序将在广泛的设备和操作系统的发布的不要放在一个网页视图中滚动型黑客。我建议您只使用的WebView和使用JavaScript和JavaScript接口动态地修改你的WebView。

There is plenty of documentation on SO regarding WebViews in ScrollViews. In short, there are hacks that might fix 'your' device and 'your' os but if your app will be released on a wide range of devices and os's do not put a WebView in a ScrollView. I recommend using only a WebView and use javascript and a javascript interface to alter your WebView dynamically.

这篇关于利用内幕滚动型机器人的WebView用jQuery Mobile的网络空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆