![]() In the computer file system, Android Studio would have created a folder called drawable-nodpi. In the Android Studio project view, the resource name is displayed as androidparty.png (nodpi). Notice the drawable-nodpi folder.Īndroid Studio creates a drawable-nodpi folder and places your image in it. Android Studio shows you the folder structure in which your image will be placed.For photographs and background images, such as the current image, the androidparty.png, you should place them in the drawable-nodpi folder, which stops the resizing behavior.įor more information about pixel densities, see Support different pixel densities. When you resize images that are larger than the Android system can handle, an out-of-memory error is thrown. If you don't consider these variations in pixel density, the system might scale your images, which could result in blurry images, or large images that consume too much memory, or images that are sized improperly. That is, while one device has 160 pixels per square inch, another device fits 480 pixels in the same space. You'll learn why you're doing this, in a later section.Īndroid devices come in different screen sizes (phones, tablets, and TVs to name a few), and their screens also have different pixel sizes. Select Density from the QUALIFIER TYPE drop-down list. Android Studio shows you a preview of the image.This action opens the Import drawables dialog. In the file browser, select the image file that you downloaded and then click Open.Click + (Add resources to the module) > Import Drawables. ![]() Note: Resource Manager is a tool window that lets you import, create, manage, and use resources in your app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |