For example, on a hdpi device, a certain device launcher may want to use the xhdpi version of the app icon instead. This is because some launchers may display your app icon at a larger size than what's provided by the device's default density bucket. Note: You may wonder why launcher icon assets are located in mipmap directories separate from other app assets located in drawable directories. anydpi - resources that scale to any density.nodpi - resources that are not meant to be scaled, regardless of the screen's pixel density.xxxhdpi - resources for extra-extra-extra-high-density screens (~640dpi).xxhdpi - resources for extra-extra-high-density screens (~480dpi).xhdpi - resources for extra-high-density screens (~320 dpi).hdpi - resources for high-density screens (~240 dpi).mdpi - resources for medium-density screens (~160 dpi).Here's a list of density qualifiers on Android: are density qualifiers that you can append onto the name of a resource directory (like mipmap) to indicate that these are resources for devices of a certain screen density. These mipmap folders are where you should put the launcher icon assets for your Android app. Navigate to the resources directory ( app > src > main > res) and expand out some of the mipmap folders.This will show you the files in your project according to the file structure of how those files are saved on your computer. In the Project window, switch to the Project view.If your app was started from a template, then you should have default launcher icons that are already provided by Android Studio. To see what this looks like, open up your project in Android Studio.To account for devices across a range of screen densities, you'll need to provide different versions of your app icon. For a medium-density device (mdpi), there are 160 dots per inch on the screen while an extra-extra-extra-high-density device (xxxhdpi) has 640 dots per inch on the screen. Specifically, screen pixel density refers to how many pixels per inch (or dpi, dots per inch) are on the screen. The goal is for your launcher icon to look fantastic (crisp and clear) regardless of the device model or screen density. That way you don't modify or overwrite launcher icon files in an existing app until you are more comfortable with these steps. If you're taking this codelab on its own (outside of the course), you can set up a new project in Android Studio using the Empty Activity template. If you're taking this codelab as part of the Android Basics in Kotlin course, you can directly use the tip calculator from the previous codelab that you're already working on. Internet connection to download the image resource files.A computer with the latest stable version of Android Studio installed.An Android app that has a new launcher icon.What is an adaptive icon and why it's made up of two layers.
0 Comments
Leave a Reply. |