Mipmap与可绘制文件夹[重复]

本文翻译自:Mipmaps vs. drawable folders [duplicate]

This question already has an answer here: 这个问题已经在这里有了答案:

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: 我正在使用Android Studio 1.1 Preview1。我注意到在创建新项目时,我得到了以下层次结构:

在此处输入图片说明

Mipmap folders for different DPIs, no more different DPIs drawable folders. 用于不同DPI的Mipmap文件夹,没有其他不同的DPI可绘制文件夹。

Should I put all my resources in the mipmap folders, or just the app icon? 我应该将所有资源都放在mipmap文件夹中还是仅放在应用程序图标中?


#1楼

参考:https://stackoom.com/question/1tl3b/Mipmap与可绘制文件夹-重复


#2楼

The mipmap folders are for placing your app/launcher icons (which are shown on the homescreen) in only. mipmap文件夹仅用于放置您的应用程序/启动器图标(显示在主屏幕上)。 Any other drawable assets you use should be placed in the relevant drawable folders as before. 您使用的任何其他可绘制资产应像以前一样放置在相关的可绘制文件夹中。

According to this Google blogpost : 根据此Google博客文章

It's best practice to place your app icons in mipmap- folders (not the drawable- folders) because they are used at resolutions different from the device's current density. 最佳做法是将应用程序图标放置在mipmap-文件夹(而不是drawable-文件夹)中,因为它们的使用分辨率与设备的当前密度不同。

When referencing the mipmap- folders ensure you are using the following reference: 引用mipmap-文件夹时,请确保使用以下引用:

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. 因此,他们使用下一个尺寸。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值