1

Hi im having problems getting an app i have written for the motorola xoom to fill the screen. When i run the app it runs it in the middle of the screen as if it was on a phone or something. When creating the main.xml at the top it is showing the screen as a 10.1in WXGA screen and the system at the right hand side is set to Android 3.1

Any idea what im doing wrong?

Marty Cochrane
  • 679
  • 2
  • 13
  • 26

3 Answers3

2

Screen sizes beyond phone screens was added in Donut (API 4). Thus to say that you know about different screen sizes, you need to set at least API 4 as the target SDK version in your manifest:

<manifest ...> <uses-sdk android:targetSdkVersion="4" />   </manifest>

This allows the system to use the modern defaults for the supported screens that you can specify with this:

http://developer.android.com/guide/topics/manifest/supports-screens-element.html

The use of android:targetSdkVersion is very important, since it allows the platform to disable a variety of compatibility behavior for your app to allow it to run better on more recent versions of the platform. Some of the things it impacts can be found here:

http://developer.android.com/reference/android/os/Build.VERSION_CODES.html

hackbod
  • 90,665
  • 16
  • 140
  • 154
0

I had the same problem with porting to Galaxy Tab. Make sure you specify the correct API Level. I used an old one and had the same behaviour.

Hyperboreus
  • 31,997
  • 9
  • 47
  • 87
0

Try adding this to your AndroidManifest.xml: <uses-sdk android:minSdkVersion="4" />

mah
  • 39,056
  • 9
  • 76
  • 93