O'Reilly logo

Android Application Development For Dummies, 2nd Edition by Donn Felker, Michael Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating the AndroidManifest File

You need to tell Android that your app works on the large and extra-large screens of tablets. Without it, your app runs in Compatibility mode as though it was on a smaller screen, and Android expands your app so that it fills the screen. Your app can look “jaggy” and ugly.

Edit the AndroidManifest.xml file to add the following lines to the supports-screens element inside the <manifest> element before the <application> element:

<supports-screens

android:largeScreens=”true”

android:normalScreens=”true”

android:smallScreens=”true”

android:xlargeScreens=”true” />

remember.eps You might think that setting one of these attributes to false prevents your app from being downloaded by devices of that size, but that isn’t necessarily the case. If xlargeScreens=”false”, for example, your app is still downloadable on extra-large devices, but it runs in Compatibility mode and Android scales it up to fit the screen. On the other hand, while it’s easy to expand an app, it’s hard to shrink it, so if smallScreens=”false” your app isn’t downloadable by small screen devices.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required