- 浏览: 1071454 次
- 性别:
- 来自: 南昌
-
文章分类
- 全部博客 (276)
- 生活 (1)
- 代码之美 (22)
- Media (7)
- Android Widget (3)
- Android Intent (1)
- Android Activity (4)
- UI event handle--UI事件处理机制 (2)
- Java基础知识 (12)
- android Databases (5)
- Android 系统知识 (70)
- 平常遇到的问题与解决方法 (38)
- Android TextView/EditView (2)
- Thinking Java (1)
- android webkit (6)
- JSON (1)
- XML (4)
- HTTP (1)
- Google Weather API (1)
- android 2.3 NFC (10)
- android app (20)
- android framework (7)
- C++ (2)
- android System (5)
- Pthread (1)
- Wifi (8)
- Unix/Linux C (8)
- Android 4.0 (1)
- Mail (1)
- Smack 源码学习 (4)
- iOS (4)
- Android (1)
- git (1)
- Gallery3d (2)
- React-Natice (1)
最新评论
-
dd18349182956:
你是用的smack哪个版本?我用的smack4.1.3和sma ...
关于socket长连接的心跳包 -
xukaiyin:
全英文
getApplicationContext()与this,getBaseContext() -
裂风矢:
...
<category android:name="android.intent.category.DEFAULT" /> 惹的祸 -
xanthodont:
mark一下
XMPP——Smack -
Evilover3:
mark一下,学习了
XMPP——Smack
最近在看AOSP,发现mipmaps, 百度 了一下,发现有各种说法,最后还是google出来的比较正确。
引用官方文档中:
http://developer.android.com/tools/projects/index.html#mipmap
[size=medium]Managing Launcher Icons as mipmap Resources[/size]
Different home screen launcher apps on different devices show app launcher icons at various resolutions. When app resource optimization techniques remove resources for unused screen densities, launcher icons can wind up looking fuzzy because the launcher app has to upscale a lower-resolution icon for display. To avoid these display issues, apps should use the mipmap/ resource folders for launcher icons. The Android system preserves these resources regardless of density stripping, and ensures that launcher apps can pick icons with the best resolution for display.
Make sure launcher apps show a high-resolution icon for your app by moving all densities of your launcher icons to density-specific res/mipmap/ folders (for example res/mipmap-mdpi/ and res/mipmap-xxxhdpi/). The mipmap/ folders replace the drawable/ folders for launcher icons. For xxhpdi launcher icons, be sure to add the higher resolution xxxhdpi versions of the icons to enhance the visual experience of the icons on higher resolution devices.
Note: Even if you build a single APK for all devices, it is still best practice to move your launcher icons to the mipmap/ folders.
这里面有说到app resource optimization techniques remove resources for unused screen densities 这句是重点,说 app资源优化技术会将不需要的解析度的屏幕的资源移除掉,这样 Launcher App会使用低密度的 icon放大显示而导致了 icon 模糊。如果把icon放到mipmap/ folders 所有all densities 的都会被保留,这样匹配的时候会用高密度的 icon去缩小显示,这样就避免了模糊。
这里提到到app resource optimization techniques,我还没有搜索到相关信息。
有一篇文章说明了mipmap的历史:
https://androidbycode.wordpress.com/2015/02/14/goodbye-launcher-drawables-hello-mipmaps/
Why use mipmaps for your launcher icons?
Using mipmaps for your launcher icon is described as best practice by the Android team. The advantage you get is that you can keep resources in the mipmap folders for all device densities and then strip out other resources from the drawable folders that are not relevant to the specific users device density.
Here is an example, say a user has a device that is classified as xxhdpi. The drawable resources in your apk for all other densities, such as xxxhdpi, are not required and can be stripped out. The launcher icon is different to other resources as it is possible that a higher resolution icon is displayed in the users launcher. If that higher resolution image has been stripped from your drawables folder, then a lower density icon will programmatically be up-scaled. This may cause an unattractive blurry icon.
You may not be producing multiple apk files with stripped out resources to minimize apk size yet. Therefore making the change to mipmaps for your launcher icon will currently not make any difference. That does not mean you should not do it. The best reason for using mipmaps folder is that the Android team want you to and describe it as best practice. They know what new features are in the pipeline for Android and who knows, but maybe they are planning to introduce a new feature where unused resources are automatically stripped for the user when they download apps.
History of launcher mipmaps in Android
The mipmaps resource folders in Android started appearing long before they were introduced to the wider Android development community to use, which started in Android Jelly Bean 4.3. Very little official information came from the Android team about why to use them. Around the time of the release of 4.3, Android framework developer @hackbod announced:
…if you are building different versions of your app for different densities, you should know about the “mipmap” resource directory. This is exactly like “drawable” resources, except it does not participate in density stripping when creating the different apk targets.
Since that time if you have taken a close look at the apps produced out of Google you will notice that some apps were doing exactly that. Shipping only the required density but including all densities in the mipmap folders for the launcher icons.
As time went on still there was not much noise out of the Android team about using launcher mipmaps, that was until Lollipop hit AOSP and the new Nexus devices hit the market. The Android Developers blog posted about preparing your apps for the new Nexus 6 and 9. This detailed a compelling reason you should use mipmap folders for your app icon and announced the shift of best practice to using mipmaps:
…Provide at least an xxxhdpi app icon because devices can display large app icons on the launcher. 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. For example, an xxxhdpi app icon can be used on the launcher for an xxhdpi device.
引用官方文档中:
http://developer.android.com/tools/projects/index.html#mipmap
[size=medium]Managing Launcher Icons as mipmap Resources[/size]
Different home screen launcher apps on different devices show app launcher icons at various resolutions. When app resource optimization techniques remove resources for unused screen densities, launcher icons can wind up looking fuzzy because the launcher app has to upscale a lower-resolution icon for display. To avoid these display issues, apps should use the mipmap/ resource folders for launcher icons. The Android system preserves these resources regardless of density stripping, and ensures that launcher apps can pick icons with the best resolution for display.
Make sure launcher apps show a high-resolution icon for your app by moving all densities of your launcher icons to density-specific res/mipmap/ folders (for example res/mipmap-mdpi/ and res/mipmap-xxxhdpi/). The mipmap/ folders replace the drawable/ folders for launcher icons. For xxhpdi launcher icons, be sure to add the higher resolution xxxhdpi versions of the icons to enhance the visual experience of the icons on higher resolution devices.
Note: Even if you build a single APK for all devices, it is still best practice to move your launcher icons to the mipmap/ folders.
这里面有说到app resource optimization techniques remove resources for unused screen densities 这句是重点,说 app资源优化技术会将不需要的解析度的屏幕的资源移除掉,这样 Launcher App会使用低密度的 icon放大显示而导致了 icon 模糊。如果把icon放到mipmap/ folders 所有all densities 的都会被保留,这样匹配的时候会用高密度的 icon去缩小显示,这样就避免了模糊。
这里提到到app resource optimization techniques,我还没有搜索到相关信息。
有一篇文章说明了mipmap的历史:
https://androidbycode.wordpress.com/2015/02/14/goodbye-launcher-drawables-hello-mipmaps/
Why use mipmaps for your launcher icons?
Using mipmaps for your launcher icon is described as best practice by the Android team. The advantage you get is that you can keep resources in the mipmap folders for all device densities and then strip out other resources from the drawable folders that are not relevant to the specific users device density.
Here is an example, say a user has a device that is classified as xxhdpi. The drawable resources in your apk for all other densities, such as xxxhdpi, are not required and can be stripped out. The launcher icon is different to other resources as it is possible that a higher resolution icon is displayed in the users launcher. If that higher resolution image has been stripped from your drawables folder, then a lower density icon will programmatically be up-scaled. This may cause an unattractive blurry icon.
You may not be producing multiple apk files with stripped out resources to minimize apk size yet. Therefore making the change to mipmaps for your launcher icon will currently not make any difference. That does not mean you should not do it. The best reason for using mipmaps folder is that the Android team want you to and describe it as best practice. They know what new features are in the pipeline for Android and who knows, but maybe they are planning to introduce a new feature where unused resources are automatically stripped for the user when they download apps.
History of launcher mipmaps in Android
The mipmaps resource folders in Android started appearing long before they were introduced to the wider Android development community to use, which started in Android Jelly Bean 4.3. Very little official information came from the Android team about why to use them. Around the time of the release of 4.3, Android framework developer @hackbod announced:
…if you are building different versions of your app for different densities, you should know about the “mipmap” resource directory. This is exactly like “drawable” resources, except it does not participate in density stripping when creating the different apk targets.
Since that time if you have taken a close look at the apps produced out of Google you will notice that some apps were doing exactly that. Shipping only the required density but including all densities in the mipmap folders for the launcher icons.
As time went on still there was not much noise out of the Android team about using launcher mipmaps, that was until Lollipop hit AOSP and the new Nexus devices hit the market. The Android Developers blog posted about preparing your apps for the new Nexus 6 and 9. This detailed a compelling reason you should use mipmap folders for your app icon and announced the shift of best practice to using mipmaps:
…Provide at least an xxxhdpi app icon because devices can display large app icons on the launcher. 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. For example, an xxxhdpi app icon can be used on the launcher for an xxhdpi device.
发表评论
-
打印调用堆栈
2019-11-15 15:48 512平常我们遇到不清楚代码逻辑的,可以通过打印调用堆栈来理清楚,如 ... -
你知道Log.isLoggable
2018-11-23 14:15 986我们可以通过Log.isLoggable来动态开关log的输出 ... -
android:allowUndo
2018-04-25 16:51 804Android 在Android 23增加了UndoManag ... -
《Android.Programming.Pushing.the.Limits].Erik.Hellman》记录1
2015-10-29 10:56 596最近在看《Android.Programming.Pushin ... -
System.currentTimeMillis() uptimeMillis elapsedRealtime 区别
2015-10-28 20:02 1349转自http://blog.csdn.net/wutianyi ... -
GPS的开关设置
2015-09-29 18:36 2070//modify by hyxu 2015-9-30 to s ... -
DialogFragment
2015-09-25 13:56 1072public class YesNoDialog extend ... -
ANDROID L——RecyclerView,CardView导入和使用
2015-07-23 09:51 969转自http://blog.csdn.net/a3969019 ... -
IntentService 和ResultReceiver
2015-07-22 20:00 823转自[url] http://javatechig.com/a ... -
Android media媒体库分析之:分类别统计媒体文件大小
2015-07-21 20:07 561转自http://www.linuxidc.com/Linux ... -
java.lang.IllegalArgumentException: Service Intent must be explicit
2015-07-21 20:03 1321转自:http://www.2cto.com/kf/20150 ... -
Context 和Application Context
2015-02-11 15:14 893http://possiblemobile.com/2013/ ... -
ContentProviderOperation.Builder 中withValue和withValueBackReference的区别
2015-02-10 14:01 2216关于ContentProviderOperation.Buil ... -
AndroidManifest.xml的Service元素 android:process设置
2013-05-30 17:02 11509转自:http://galin.blog.sohu ... -
android中打包含有Activity以及资源文件的jar包在工程中调用
2013-05-28 15:00 1332转自:http://www.cnblogs.com/vaiya ... -
Android杂谈--内存泄露(1)--contentView缓存使用与ListView优化
2012-11-01 09:29 2855转自:http://www.cnblogs.com/louli ... -
Handler+ExecutorService(线程池)+MessageQueue模式+缓存模式
2012-10-31 14:32 1906转自:http://www.eoeandroid.com/th ... -
Animation
2012-10-30 13:41 1147转自:http://hi.baidu.com/wendaoer ... -
Android onTouchEvent和onInterceptTouchEvent
2012-10-24 15:05 1304ViewGroup里的onInterceptTouchEven ... -
Android 内存管理的相关知识
2012-10-15 14:03 1194最近在读柯元旦的《Android 内核剖析》一书的“内存管理” ...
相关推荐
转载请注明原处!...在 .java 文件中的调用更改为(R.mipmap.xxx),不论你是放到了哪一个以mipmap开头的文件中。在 .xml 文件中的调用同样要更改 不过,我在写的时候还碰见过另外一种错误,会提示你找不到mipma
此外,res目录下还有其他子目录,如`menu`用于定义应用的菜单项,`mipmap-xxx`用于存放启动图标,`anim`存放动画资源,`raw`存放音频和非XML格式的文件,以及`xml`存放自定义的XML配置文件等。 理解这些基本文件...
drawable = ContextCompat.getDrawable(getContext(), R.mipmap.xxx); setDrawable(DrawableTextView.LEFT, drawable, width, height); Customizable attributes xml中定义了以下属性 Define xmlns:app=...
FrescoHelper.loadFrescoImage(frescoImageView, recyclerDataModel.getUrl(), R.mipmap.ic_launcher, 2, false, recyclerDataModel.getSize(), new BlurPostprocessor(context, 10)); ``` ### 带有...
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
kolesar_3cd_01_0716
latchman_01_0108
matlab程序代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
pimpinella_3cd_01_0716
petrilla_01_0308
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
内容概要:本文档由张卓老师讲解,重点探讨DeepSeek的技术革新及强化学习对未来AI发展的重要性。文章回顾了AI的历史与发展阶段,详细解析Transformer架构在AI上半场所起到的作用,深入介绍了MoE混合专家以及MLA低秩注意机制等技术特点如何帮助DeepSeek在AI中场建立优势,并探讨了当前强化学习的挑战和边界。文档不仅提及AlphaGo和小游戏等成功案例来说明强化学习的强大力量,还提出了关于未来人工通用智能(AGI)的展望,特别是如何利用强化学习提升现有LLMs的能力和性能。 适用人群:本资料适宜对深度学习感兴趣的研究人员、开发者以及想要深入了解人工智能最新进展的专业人士。 使用场景及目标:通过了解最新的AI技术和前沿概念,在实际工作中能够运用更先进的工具和技术解决问题。同时为那些寻求职业转型或者学术深造的人提供了宝贵的参考。 其他说明:文中提到了许多具体的例子和技术细节,如DeepSeek的技术特色、RL的理论背景等等,有助于加深读者对于现代AI系统的理解和认识。
有师傅小程序开源版v2.4.14 新增报价短信奉告 优化部分细节
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
商城二级三级分销系统(小程序+后台含源码).zip
li_3ck_01b_0918
nicholl_3cd_01_0516
媒体关注度是一个衡量公众对某个事件、话题或个体关注程度的重要指标。它主要反映了新闻媒体、社交媒体、博客等对于某一事件、话题或个体的报道和讨论程度。 媒体监督的J-F系数(Janis-Fadner系数)是一种用于测量媒体关注度的指标,特别是用于评估媒体对企业、事件或话题的监督力度。J-F系数基于媒体报道的正面和负面内容来计算,从而为公众、研究者或企业提供一个量化工具,以了解媒体对其关注的方向和强度。 本数据含原始数据、参考文献、代码do文件、最终结果。参考文献中JF系数计算公式。 指标 代码、年份、标题出现该公司的新闻总数、内容出现该公司的新闻总数、正面新闻数全部、中性新闻数全部、负面新闻数全部、正面新闻数原创、中性新闻数原创、负面新闻数原创,媒体监督JF系数。
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!