supports-screens-element.jd revision 7500f341dd65de97ac4272e7a9c5474423cef89f
1page.title=<supports-screens> 2@jd:body 3 4<dl class="xml"> 5 6<dt>syntax:</dt> 7<dd> 8<pre class="stx"> 9<supports-screens android:<a href="#small">smallScreens</a>=["true" | "false"] 10 android:<a href="#normal">normalScreens</a>=["true" | "false"] 11 android:<a href="#large">largeScreens</a>=["true" | "false"] 12 android:<a href="#any">anyDensity</a>=["true" | "false"] /> 13</pre> 14</dd> 15 16<dt>contained in:</dt> 17<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code></dd> 18 19<dt>description:</dt> 20<dd>Lets you specify the screen dimensions the 21application supports. By default a modern application (using API Level 4 or higher) supports all 22screen sizes and must explicitly disable certain screen sizes here; 23older applications are assumed to support only the "normal" 24screen size. Note that screen size is a separate axis from 25density. Screen size is determined as the available pixels to an application 26after density scaling has been applied. 27 28<p>Based on the target device screen density, the Android 29framework will scale down assets by a factor of 0.75 (low dpi screens) 30or scale them up by a factor of 1.5 (high dpi screens). 31The screen density is expressed as dots-per-inch (dpi).</p> 32 33<p>For more information, see 34<a href="{@docRoot}guide/practices/screens_suppport.html">Multiple Screens Support</a>.</p> 35 36 37<dt>attributes:</dt> 38 39<dd> 40<dl class="attr"><dt><a name="small"></a>{@code android:smallScreens}</dt> 41 <dd>Indicates whether the application supports smaller screen form-factors. 42 A small screen is defined as one with a smaller aspect ratio than 43 the "normal" (traditional HVGA) screen. An application that does 44 not support small screens <em>will not be available</em> for 45 small screen devices, because there is little the platform can do 46 to make such an application work on a smaller screen. Applications using 47 API Level 4 or higher default this to "true", others are "false". 48 </dd> 49 50 <dt><a name="normal"></a>{@code android:normalScreens}</dt> 51 <dd>Indicates whether an application supports the "normal" screen 52 form-factors. Traditionally this is an HVGA medium density 53 screen, but WQVGA low density and WVGA high density are also 54 considered to be normal. This attribute is "true" by default, 55 and applications currently should leave it that way. 56 </dd> 57 58 <dt><a name="large"></a>{@code android:largeScreens}</dt> 59 <dd>Indicates whether the application supports larger screen form-factors. 60 A large screen is defined as a screen that is significantly larger 61 than a "normal" phone screen, and thus may require some special care 62 on the application's part to make good use of it. An application that 63 does not support large screens will be placed as a "postage stamp" on 64 such a screen, so that it retains the dimensions it was originally 65 designed for. Applications using API Level 4 or higher default 66 to "true", others are "false". 67 </dd> 68 69 <dt><a name="any"></a>{@code android:anyDensity}</dt> 70 <dd>Indicates whether the application can accommodate any screen 71 density. Older applications (pre API Level 4) are assumed unable to 72 accomodate all densities and this is "false" by default. Applications using 73 API Level 4 or higher are assumed able to and this is "true" by default. 74 You can explicitly supply your abilities here. 75 </dd> 76 77 78</dl></dd> 79 80<!-- ##api level indication## --> 81<dt>introduced in:</dt> 82<dd>API Level 4</dd> 83 84<dt>see also:</dt> 85<dd> 86 <ul> 87 <li><a href="{@docRoot}guide/practices/screens_support.html">Multiple Screens Support</a></li> 88 <li>{@link android.util.DisplayMetrics}</li> 89 </ul> 90</dd> 91 92</dl> 93