![]() ![]() When defining your application's UI, to ensure proper display of your UI on screens with different The conversion of dp units to screen pixels is simple:įor example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. Transparently handles any scaling of the dp units, as necessary, based on the actual density of the The baseline density assumed by the system for a "medium" density screen. The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is Or position in a density-independent way. Density-independent pixel (dp) A virtual pixel unit that you should use when defining UI layout, to express layout dimensions Size and density, as specified by the generalized size and density groups. When adding support for multiple screens,Īpplications do not work directly with resolution applications should be concerned only with screen Resolution The total number of physical pixels on a screen. Orientation can change at runtime when the user rotates the device. That not only do different devices operate in different orientations by default, but the Portrait, meaning that the screen's aspect ratio is either wide or tall, respectively. Orientation The orientation of the screen from the user's point of view. Low, medium, high, extra-high, extra-extra-high, and extra-extra-extra-high. For example, a "low" density screen has fewer pixels within a given physical area,Ĭompared to a "normal" or "high" density screen.įor simplicity, Android groups all actual screen densities into six generalized densities: Screen density The quantity of pixels within a physical area of the screen usually referred to as dpi (dots Terms and concepts Screen size Actual physical size, measured as the screen's diagonal.įor simplicity, Android groups all actual screen sizes into four generalized sizes: small, Introduction to the terms and concepts used in this document and in the API, a summary of the screenĬonfigurations that the system supports, and an overview of the API and underlying ![]() This section provides an overview of Android's support for multiple screens, including: an These newįeatures are especially important if you're developing an application that's optimized for tablets.įor details, see the section about Declaring Tablet Layouts for Precisely control the layout resources your application uses for different screen sizes. If your application supportsĪndroid 1.5 or lower, please first read Strategies for Android 1.5.Īlso, be aware that Android 3.2 has introduced new APIs that allow you to more Note: The information in this document assumes that yourĪpplication is designed for Android 1.6 (API Level 4) or higher. Simply stretched to fit the screen on their devices.īy following the practices described in this document, you can create an application thatĭisplays properly and provides an optimized user experience on all supported screen configurations, In doing so, you maximize the user experience for all devices and your usersīelieve that your application was actually designed for their devices-rather than That's different from the UI for handsets.Īlthough the system performs scaling and resizing to make your application work onĭifferent screens, you should make the effort to optimize your application for different screen For example, you might want a UI for tablets At the same time, the system provides APIs that allow you to control yourĪpplication's UI for specific screen sizes and densities, in order to optimize your UIĭesign for different screen configurations. Handles most of the work to adjust each application's user interface to the screen on which it isĭisplayed. ![]() ForĪpplications, the Android system provides a consistent development environment across devices and ![]() How to Test Your Application on Multiple ScreensĪndroid runs on a variety of devices that offer different screen sizes and densities.Scaling Bitmap objects created at runtime.Declaring Tablet Layouts for Android 3.2.Designing alternative layouts and drawables.You should create screen-specific resources for precise control of your UI.The system handles most of the work of adapting your app to the current screen.The screen on which your application is displayed can affect its user interface.Android runs on devices that have different screen sizes and densities. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |