Explaining supports-screens in Android

With the multitude of screen sizes and densities of Android devices out there, it has become increasingly hard to make Android apps look good on all devices, especially in games. And this is where the manifest <supports-screens/> attribute comes in.

This manifest tag supports 4 attributes, each addressing a specific configuration: android:smallScreens, android:normalScreens, android:largeScreens and android:anyDensity. Each of them can have just a simple boolean value, true or false.

This is how this configuration in one of my apps looks like:

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

Now, here’s the catch: obviously, setting all of the attributes to “true” will make your app look the way you designed it on all screens. But for example setting all of them to false excepting normalScreens, will produce an interesting behavior on large-screen devices. It will cause the large-screen devices (Motorola Droid, HTC Evo 4G …) run the application in compatibility mode, effectively scaling everything in your app to the phone’s screen size. Thus, if you have a 100 pixel button on your G1, that button will measure 150 pixels on a Samsung Galaxy. One other result of setting normalScreens=true and everything else to false is that the app won’t be available to small-screen users (HTC Wildfire) in the Android Market.

This, along with the <uses-feature/> attribute of the Manifest configuration file, makes a very good filtering mechanism for your apps in the Marketing, effectively reducing the number of bad reviews :-) (and revenue of course)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Switch to our mobile site