Proper way of resizing an image to put in a ldpi, hdpi screen
What is the proper way of sizing the dimensions of an image in a hdpi screen vs a ldpi screen.
For instance,开发者_StackOverflow中文版 an 89*80 png displays fine, with the text, on my droid 2....but how should I go about resizing the image to be smaller on a smaller screened droid? Do I manually alter the image and place it in the ldpi folder or will it do that automatically?
Manually alter the image and place it in the LDPI folder.
Useful Resources: Screen Support - A rundown of how multiple screen sizes and densities can be supported in one Android application. Alternative Resources - The guide to using different resources (layouts, PNG files, etc) based on screen type.
From the Screen Support page:
Based on the density of the current screen, the platform automatically loads any size- or density-specific resources from your application and displays them without scaling. If no matching resources are available, the platform loads the default resources and scales them up or down as needed to match the current screen's generalized density. The platform assumes that default resources are designed for proper display at the baseline screen density of "medium" (160), unless they are loaded from a density-specific resource directory. For example, if the current screen's density is "high", the platform loads resources that are tagged with the qualifier hdpi and uses them without scaling. If no such resources are available, the platform uses the default resources instead, scaling them from the baseline density ("medium") to "high".
精彩评论