tags:

views:

57

answers:

1

Hi,

Has anyone any idea how could I obtain a view that has the following description: At the top at the page there is a custom test , and below there is displayed the content from a url .Currently my layout is the following:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     >
    <TextView  
        android:id="@id+/test"
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
    />

<WebView
    android:id="@+id/webview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
 />

</LinearLayout>

In the on create of the application tight to this layout I get the TextView with findViewById and set the text for it. Similar I get the WebView and call loadUrl("url") for it, but the behavior is not the expected one. At first the text set is briefly displayed and then a fullscreen browser page with the content from the passed url is shown.

+3  A: 

Add android:layout_weight='1' to the WebView.

synic
It works. One thing though, the webview is not below the text , but the text seems to be rendered on the surface of the webview.
rantravee
Hrmm, I just created a test application and it worked for me. Perhaps there's something else in your code causing the problem?
synic
Oh, well , I'll work around it...thanks again !
rantravee