Hello All,

I am trying to use Webview in a relative layout with a progress bar
and some buttons. But as soon as I run webview.loadUrl("my path"), the
webview takes over the entire space. I need the webview to fit in the
remaining space of my layout. Please help.

<code>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android";
        android:layout_width="fill_parent" android:layout_height="fill_parent">
        <ProgressBar android:layout_width="fill_parent"
                android:layout_alignParentTop="true" 
android:layout_height="wrap_content"
                android:id="@+id/progressBar"
style="@android:style/Widget.ProgressBar.Horizontal" />
        <LinearLayout android:id="@+id/searchLayout"
                android:layout_below="@id/progressBarText" 
android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
android:orientation="horizontal">
                <Button android:layout_width="wrap_content" 
android:id="@+id/search"
                        android:layout_height="wrap_content" 
android:text="Search"
                        android:layout_weight="1" 
android:layout_gravity="center_vertical" />
                <Button android:layout_width="wrap_content" 
android:id="@+id/cancel"
                        android:layout_height="wrap_content" 
android:text="Cancel"
                        android:layout_weight="1" 
android:layout_gravity="center_vertical" />
        </LinearLayout>
        <ImageButton android:layout_alignParentLeft="true"
                android:background="@android:color/transparent"
                android:layout_centerInParent="true" 
android:src="@drawable/left"
                android:layout_height="wrap_content" 
android:layout_width="wrap_content"
                android:id="@+id/previous"></ImageButton>
        <ImageButton android:layout_width="wrap_content"
                android:background="@android:color/transparent"
android:layout_height="wrap_content"
                android:layout_alignParentRight="true" 
android:layout_centerInParent="true"
                android:src="@drawable/right" 
android:id="@+id/next"></ImageButton>
        <WebView android:id="@+id/searchResultPages"
                android:layout_below="@id/searchResultPages"
                android:layout_alignParentBottom="true" 
android:layout_width="fill_parent"
                android:layout_height="wrap_content" />
</RelativeLayout>
</code>

The AndroidManifest.xml has
<code>
<activity android:name="com.reader.android.MyActivity"
                        android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden"
                        android:windowSoftInputMode="stateHidden">
                        <!-- 
</>android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> -->
</code>

Regards
Conny

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to