How to make a mobile phone application fill the entire screen on a tablet (Xoom)?

I tried to run my application on the Xoom tablet, and in the end he got exactly the same size of a mobile phone (it does not fill the entire screen).

So, I created a very simple project that shows only image degradation and a progress indicator in the middle. I had the same result as you can see in the picture below:

Xoom - small screen http://raphaeu.com/gvt/Imagem.jpg

So, how will I write my layout to fill the entire screen of the tablet?

Here is my manifest:

<?xml version="1.0" encoding="utf-8"?>

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".MainActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>

Here is my main.xml 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"
  android:background="@drawable/splash_portrait">

<ProgressBar 
    style="?android:progressBarStyle"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true" 
    android:layout_centerInParent="true"
/>

</RelativeLayout>

And here is the whole project, if you want to look at it: http://raphaeu.com/gvt/xoom.zip

Thank you in advance!

+3
source share
2

.

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

... http://developer.android.com/guide/practices/screens-distribution.html

+4

xml "fill_parent" . wrap_content , , , , .

0

All Articles