开发者

Webview with tabbar below

I have a tabbar at the bottom of my screen. The XML-file looks like this:

<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:lay开发者_如何学Pythonout_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>

On one of the pages I have a webview. XML-file:

    <?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>

The problem is that of the web page in the webview is too long, the tabbar disappears. How can I solve that problem?

Kind regards,

Joachim


I made modification of your code. Now its working as per expectation.

<?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>

Donot forget to vote if my response is helpful for you.

Thanks Deepak

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜