Веб-просмотр с панелью вкладок ниже

У меня есть панель вкладок внизу экрана. XML-файл выглядит так:

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

Проблема в том, что веб-страница в веб-просмотре слишком длинная, панель вкладок пропадает. Как я могу решить эту проблему?

С уважением,

Иоахим


person Joachim    schedule 25.05.2011    source источник
comment
где ваш xml файл........??   -  person Sujit    schedule 25.05.2011
comment
ты нашел проблему? У меня такая же проблема, и я схожу с ума!   -  person Jaume    schedule 22.02.2012


Ответы (1)


Я сделал модификацию вашего кода. Теперь он работает в соответствии с ожиданиями.

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

Не забудьте проголосовать, если мой ответ был вам полезен.

Спасибо, Дипак.

person Sunil Kumar Sahoo    schedule 25.05.2011
comment
Та же проблема для меня, и предложенное решение не работает. Все еще подходит для полноэкранного режима! - person Jaume; 22.02.2012