Hi graeth,
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<WebView android:id="@+id/Newwebview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_x="0px"
android:layout_y="0px" />
</LinearLayout>
this code work in my application you just debug your code you mis something
to code.
and you can use also for full screen
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
On Wed, Feb 23, 2011 at 8:13 AM, Craigbtx <[email protected]> wrote:
> This works for me at its simplest.
>
> <?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="fill_parent">
>
>
> <WebView
> android:id="@+id/webview"
> android:layout_width="fill_parent"
> android:layout_height="0dip"
> android:layout_weight="1"/>
>
>
> </LinearLayout>
>
>
> On Feb 19, 12:07 pm, Gareth <[email protected]> wrote:
> > Hi all
> >
> > I am developing a web app for a tablet.
> >
> > If I just place a WebView in the layout file it works fine except the
> > WebView doesn't fill the whole screen on the tablet.
> >
> > If I then put the WebView in a Linear Layout on its own - the
> > application crashes on start up saying it was forced to close!
> >
> > Any ideas on how to get a WebView to fill the whole screen?
> >
> > Thanks
> > Gareth
> >
> > PS - crashing layout file as follows
> >
> > <?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="fill_parent">
> > <WebView xmlns:android="http://schemas.android.com/apk/res/android"
> > android:id="@+id/webview"
> > android:layout_width="fill_parent"
> > android:layout_height="fill_parent"
> > />
> > </LinearLayout>
>
> --
> 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
>
--
Thanks and Regards,
Ankit Kasliwal
[email protected]
+91-9300-940-136
--
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