带有Tabbar的Webview下面

问题描述:

我的屏幕底部有一个tabbar。 XML文件如下所示:带有Tabbar的Webview下面

<TabHost android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:id="@android:id/tabhost" 
    xmlns:android="http://schemas.android.com/apk/res/android" > 
    <RelativeLayout 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@color/background"> 
    <TabWidget 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:id="@android:id/tabs" 
    android:layout_alignParentBottom="true" /> 
    <FrameLayout 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:id="@android:id/tabcontent" > 

    </FrameLayout> 
    </RelativeLayout> 
</TabHost> 

在其中一个页面上,我有一个webview。 XML文件:

<?xml version="1.0" encoding="utf-8"?> 
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:background="@color/background" 

    > 

    <RadioGroup 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:orientation="horizontal" 
     android:gravity="center_horizontal" 

     android:id="@+id/group1" 

    > 


<nl.smartcityguide.geurenkleuren.SegmentedControlButton android:checked="false" android:text="@string/string1" android:id="@+id/option1" /> 
<nl.smartcityguide.geurenkleuren.SegmentedControlButton android:checked="false" android:text="@string/string2" android:id="@+id/option2" /> 

</RadioGroup> 


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

> 
</WebView> 



</LinearLayout> 

问题是webview中的网页太长,tabbar消失。我该如何解决这个问题?

亲切的问候,

约阿希姆

+0

其中是你的xml文件........ ?? ?? – Sujit 2011-05-25 12:28:21

+0

您是否发现问题?我有同样的问题,正在让我疯狂! – Jaume 2012-02-21 20:07:15

我做你的代码的修改。现在它按预期工作。

<?xml version="1.0" encoding="utf-8"?> 
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:background="@color/background" 

    > 

<WebView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/webview1" 
    android:layout_alignParentBottom="true" 
> 
</WebView> 
    <RadioGroup 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:orientation="horizontal" 
     android:gravity="center_horizontal" 

     android:id="@+id/group1" 
     android:layout_above="@+id/webview1" 
    > 


<nl.smartcityguide.geurenkleuren.SegmentedControlButton android:checked="false" android:text="@string/string1" android:id="@+id/option1" /> 
<nl.smartcityguide.geurenkleuren.SegmentedControlButton android:checked="false" android:text="@string/string2" android:id="@+id/option2" /> 

</RadioGroup> 

不要忘记投票,如果我的回应对你有帮助。

谢谢 Deepak

+0

与我同样的问题,并建议解决方案无法正常工作。仍然适合全屏! – Jaume 2012-02-21 20:05:34