Android Studio的图片到底是放在drawable还是mipmap呢

从事Android 开发的工程师们一直以为都在讨论一个问题,那就是图片到底应该放在android Studio软件drawable文件夹下,还是应该放在mipmap下?

争论再多,不如官方解释来的权威,看Google官方:

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/
     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.

所以图片放在drawable文件夹下,分为几个不同分辨率的文件夹,而app icons 放在mipmap下。


猜你喜欢

转载自blog.csdn.net/u012604745/article/details/73605342