WebView Bug


Last Updated:

  1. mg4android

    mg4android Member This Topic's Starter

    Joined:
    Jun 24, 2010
    Messages:
    22
    Likes Received:
    1
    It appears that my WebView is ALWAYS FULL screen and doesn't respect the layout . Also, Activity menus are not the ones I set but the browsers.

    I am testing on an 2.1 android emulator.

    Has anyone encountered this and know of a way to size
    the WebView and be able to set your own menu ?

    THANKS in advance!!


    Code snippet .........

    setContentView(R.layout.mainactivity);
    WebView webV = (WebView)findViewById(R.id.webview);
    webV.setInitialScale(30);
    webV.loadUrl(getString(R.string.app_url));


    Layout ....


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

    <TextView android:id="@+id/label"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Type here:"/>

    WebView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/webview" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:layout_below="@id/label"
    />

    </RelativeLayout>
     

    Advertisement
  2. mg4android

    mg4android Member This Topic's Starter

    Joined:
    Jun 24, 2010
    Messages:
    22
    Likes Received:
    1
    It appears that the WebView displays OK and respects the layout
    if the URL is Google or any of its sites such as code.google.com.

    For other web sites such as ...

    MSN.com
    Yahoo!
    ww.amazon.com

    the webView will always be FULLl screen and all other views on the screen are not shown !?!?!

    Any ideas !?!

    Thanks in advance!

    PS. Individual html via loadData works ok and respects the layout
     

Share This Page

Loading...