views:

54

answers:

1

My WebView doesn't fill the entire width of my phone. I am telling to fill_parent. Not sure why?

<?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"
        android:orientation="horizontal">

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

The linear layout is orientation horizontal I don't think you can fill width on orientation horizontal.

Try using RelativeLayout instead. (just rename LinearLayout to RelativeLayout)

cjavapro
no luck changing to relative layout
Sheehan Alam