您的位置:首页 > 移动开发 > Android开发

Android Studio上 drawable与mipmap的区别

2016-04-01 13:53 405 查看
两者在使用上没有区别,可以把mipmap当做drawable来用,但mipmap比drawable缩放的性能更好。

所以最适合的方式就是:

mipmap存放图片资源,drawable存放selector或者shape之类的xml

扩展阅读:

Android官网解释的原文地址

http://developer.android.com/intl/zh-cn/tools/projects/index.html#ApplicationModules

官方对drawable的解释

drawable/
For bitmap files (PNG, JPEG, or GIF), 9-Patch image files, and XML files that describe Drawable shapes or Drawable objects that contain multiple states (normal, pressed, or focused). See the Drawable resource type.


官方对mipmap的解释

mipmap/
For app launcher icons. The Android system retains the resources in this folder (and density-specific folders such as mipmap-xxxhdpi) regardless of the screen resolution of the device where your app is installed. This behavior allows launcher apps to pick the best resolution icon for your app to display on the home screen. For more information about using the mipmap folders, see Managing Launcher Icons as mipmap Resources.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: