Skip to content

Instantly share code, notes, and snippets.

@pckujawa
Created April 16, 2012 04:00
Show Gist options
  • Save pckujawa/2396287 to your computer and use it in GitHub Desktop.
Save pckujawa/2396287 to your computer and use it in GitHub Desktop.
Escape the shoebox on android legacy apps
<supports-screens android:largeScreens="true" android:anyDensity="true" />
@pckujawa
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment