Reputation: 689
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?
Upvotes: 1
Views: 1430
Reputation: 91331
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
Upvotes: 2
Reputation: 39807
Try adding this to your AndroidManifest.xml: <uses-sdk android:minSdkVersion="4" />
Upvotes: 0
Reputation: 32429
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.
Upvotes: 0