R.mipmap
public static final class R.mipmap
extends Object
java.lang.Object | |
↳ | android.R.mipmap |
Summary
Constants | |
---|---|
int | sym_def_app_icon Default icon for applications that don't specify an icon. |
Public constructors | |
---|---|
R.mipmap() |
Inherited methods | |
---|---|
From class java.lang.Object
|
Constants
sym_def_app_icon
int sym_def_app_icon
Default icon for applications that don't specify an icon.
Constant Value: 17629184 (0x010d0000)
经过查询官方和第三方资料,得出结论:
mipmap文件夹下,仅仅建议放启动图标/app launcher icons,也就是应用安装后,会显示在桌面的那个图标。而其他的图片资源等,还是按照以前方式,放在drawable文件夹下。
下面再详细阐述下,得出以上结论的依据:
1.google官方关于mipmap和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/
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.
2.stackoverflow上关于mipmap和drawable的区别
The mipmap folders are for placing your app icons in only. Any other drawable assets you use should be placed in the relevant drawable folders as before.