问题描述
我正在使用Android Studio 1.1 Preview1.我注意到,当我创建一个新项目时,我得到了以下层次结构:
I'm working with Android Studio 1.1 Preview 1. I noticed that when I create a new project I'm getting the following hierarchy:
用于不同DPI的Mipmap文件夹,没有其他不同的DPI可绘制文件夹.
Mipmap folders for different DPIs, no more different DPIs drawable folders.
我应该将所有资源都放在mipmap文件夹中还是仅放在应用程序图标中?
Should I put all my resources in the mipmap folders, or just the app icon?
推荐答案
mipmap文件夹仅用于放置您的应用程序/启动器图标(显示在主屏幕上).您使用的任何其他可绘制资产应像以前一样放置在相关的可绘制文件夹中.
The mipmap folders are for placing your app/launcher icons (which are shown on the homescreen) in only. Any other drawable assets you use should be placed in the relevant drawable folders as before.
根据此Google博文:
在引用 mipmap-文件夹时,请确保使用以下引用:
When referencing the mipmap- folders ensure you are using the following reference:
android:icon="@mipmap/ic_launcher"
之所以使用不同的密度,是因为某些启动器实际上显示的图标比预期的要大.因此,他们使用下一个尺寸.
The reason they use a different density is that some launchers actually display the icons larger than they were intended. Because of this, they use the next size up.
这篇关于Mipmap与可绘制文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!