Created
April 16, 2012 04:00
-
-
Save pckujawa/2396287 to your computer and use it in GitHub Desktop.
Escape the shoebox on android legacy apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<supports-screens android:largeScreens="true" android:anyDensity="true" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Taken from http://android-developers.blogspot.com/2010/09/screen-geometry-fun.html
Escape the Shoebox
I've observed that a certain number of applications appear “shoeboxed”, running in a handset-like number of pixels in the center of the screen, surrounded by a wide black band. They work fine, but this is silly, and easy to avoid. It turns out that this happens when you have a targetSdkVersion value less than four; this is interpreted to mean that you’re targeting the legacy Cupcake flavor of Android, which only supported HVGA.
In any case, if you want to make 100% sure that your app doesn’t get pushed into the shoebox, the supports-screens element is your friend; here’s what we recommend:
<supports-screens android:largeScreens="true" android:anyDensity="true" />
(Both those attributes default to "false" for API levels less than 4.) Given a chance, the framework gets a good result on almost any Android screen imaginable.