tags:

views:

51

answers:

2
    <?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"
    >
<EditText 
    android:id="@+string/urlText"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:hint="Enter Url Here"/>
<Button
 android:id="@+string/go"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Go"/>
<WebView
 android:id="@+string/webView"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    />
</LinearLayout>

So with the above android layout, I am not able to make the editbox and button to be to the full width of the container. About 50 px from the left and the right are not filled.

Any sugestions

+2  A: 

Is your app running in compatibility mode? From your description it sounds like it is, which would explain why it has HVGA dimensions (320x480).

Romain Guy
I am targeting 2.2 android sdk, how to turn off compability mode ?
Vladimir Georgiev
+1  A: 

So, I figured it out.

I went to the manifest file and added attributes for Supports Screens:

<supports-screens 
    android:largeScreens="true" 
    android:normalScreens="false" 
    android:smallScreens="false" 
    android:resizeable="true" 
    android:anyDensity="true">
</supports-screens>

Thanks to Romain Guy for mentioning compability mode :) Everything works now like a charm.

Vladimir Georgiev