Android的 - Webview是使得蜂巢问题 [英] Android - Webview is making problem in HoneyComb

查看:132
本文介绍了Android的 - Webview是使得蜂巢问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发摩托XOOM的应用程序。我在显示的WebView的一些静态的内容,一旦内容被加载,向下滚动,在底部显示一个按钮后。

I am developing an application for moto xoom. I am displaying some static content in the webview, once the content is loaded, after scrolling down, displaying one button in the bottom.

以下是属性设置为网页视图。

Following are the properties set to webview.

mWebview.setWebViewClient(new WebViewClient());
mWebview.setVerticalScrollBarEnabled(false);
mWebview.getSettings().setJavaScriptEnabled(true);  
mWebview.getSettings().setDefaultZoom(ZoomDensity.MEDIUM);

mWebview.loadData(data, "text/html", "UTF-8");

在布局,

我添加了一个linerarlayout,那的LinearLayout 1的WebView内下方的滚动视图内的按钮是存在的。

inside the scroll view I have added one linerarlayout, inside that linearlayout one webview and below to that a button is there.

问题是有时有web视图和按键之间有更多的空间,有时它应有的。

The issue is sometimes there is more space between the webview and button, sometimes its proper.

和它在三星Galaxy Tab完美的工作,这个问题只发生在摩托XOOM。

And it is perfectly working in samsung galaxy tab, this issues happens only in moto xoom.

在这里添加布局

<ScrollView
    android:id="@+id/ScrollView01"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent"
    android:scrollbarAlwaysDrawVerticalTrack="true"
    android:scrollbars="vertical"
    android:fadingEdge="none"
    android:fadeScrollbars="false">
    <LinearLayout
        android:background="#FFFFFF"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical">

        <WebView
            android:id="@+id/webView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">
        </WebView>
        <Button
            android:layout_height="wrap_content"
            android:id="@+id/btnAccept"
            android:layout_width="wrap_content"
            android:bufferType="normal"
            android:textSize="18dip"
            android:textStyle="bold"
            android:padding="10dip"
            android:layout_margin="10dip"
            android:background="@drawable/btn_terms_iaccept"
            android:layout_gravity="center_horizontal"
            android:visibility="gone"></Button>

    </LinearLayout>
</ScrollView>

谁能帮我?

感谢。

推荐答案

当我们添加两个滚动控制一个其他那么它给这些类型的问题在里面,所以不是我的WebView添加滚动视图内的TextView。并使用下面的一行。我在直接TextView的加载HTML内容。

When we add two scrollable controls one inside the other then its giving these kind of issues, so instead of webview I have added the textview inside the scrollview. And using the following line. I have loaded html content in the textview directly.

txtViewContent.setText(Html.fromHtml(数据)); //数据是HTML字符串

txtViewContent.setText(Html.fromHtml(data)); // data is html string

这篇关于Android的 - Webview是使得蜂巢问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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