翻阅了Android 开发者官网(
http://developer.android.com);
找到以下解释:
<code class="hljs livecodeserver has-numbering">main/res/ Contains application resources, such <span class="hljs-keyword">as</span> drawable <span class="hljs-built_in">files</span>, layout <span class="hljs-built_in">files</span>, <span class="hljs-operator">and</span> <span class="hljs-keyword">string</span> values <span class="hljs-operator">in</span> <span class="hljs-operator">the</span> following <span class="hljs-built_in">directories</span>. See Application Resources <span class="hljs-keyword">for</span> more information. drawable/ <span style="color:#FF0000;">For bitmap <span class="hljs-built_in">files</span> (PNG, JPEG, <span class="hljs-operator">or</span> GIF), <span class="hljs-number">9</span>-Patch image <span class="hljs-built_in">files</span>, <span class="hljs-operator">and</span> XML <span class="hljs-built_in">files</span> </span>that describe Drawable shapes <span class="hljs-operator">or</span> Drawable objects that contain multiple states (<span class="hljs-keyword">normal</span>, pressed, <span class="hljs-operator">or</span> focused). See <span class="hljs-operator">the</span> Drawable resource type. mipmap/ <span style="color:#FF0000;">For app launcher icons</span>. The Android <span class="hljs-keyword">system</span> retains <span class="hljs-operator">the</span> resources <span class="hljs-operator">in</span> this <span class="hljs-built_in">folder</span> (<span class="hljs-operator">and</span> density-specific <span class="hljs-built_in">folders</span> such <span class="hljs-keyword">as</span> mipmap-xxxhdpi) regardless <span class="hljs-operator">of</span> <span class="hljs-operator">the</span> screen resolution <span class="hljs-operator">of</span> <span class="hljs-operator">the</span> device where your app is installed. This behavior allows launcher apps <span class="hljs-built_in">to</span> pick <span class="hljs-operator">the</span> best resolution icon <span class="hljs-keyword">for</span> your app <span class="hljs-built_in">to</span> display <span class="hljs-command"><span class="hljs-keyword">on</span> <span class="hljs-title">the</span> <span class="hljs-title">home</span> <span class="hljs-title">screen</span>. <span class="hljs-title">For</span> <span class="hljs-title">more</span> <span class="hljs-title">information</span> <span class="hljs-title">about</span> <span class="hljs-title">using</span> <span class="hljs-title">the</span> <span class="hljs-title">mipmap</span> <span class="hljs-title">folders</span>, <span class="hljs-title">see</span> <span class="hljs-title">Managing</span> <span class="hljs-title">Launcher</span> <span class="hljs-title">Icons</span> <span class="hljs-title">as</span> <span class="hljs-title">mipmap</span> <span class="hljs-title">Resources</span>.</span></code>
从上边的红色部分能看出drawable下可以是 png,jpeg,gif,9-patch,xml 等文件。
而mipmap则没有明确指出能使用哪种文件。
但是我在使用过程中发现.9图片不能在mipmap中使用,可以在drawable中使用。
另外 还有一个区别就是在图片的缩放上mipmap优化了一些性能。