Android开发随身笔记
来源:互联网 发布:淘宝店铺公告栏 编辑:程序博客网 时间:2024/06/03 02:29
今天在开发app时发现自己项目里的图片放的太过随意了,在mipmap 和drawable 里都放了许多图片,感觉不对劲的我赶紧上官网查了
下面是引用自 google 官方的描述:
Mipmapping for drawables
Using a mipmap as the source for your bitmap or drawable is a simple way to provide a quality image and various image scales, which can be particularly useful if you expect your image to be scaled during an animation.
Android 4.2 (API level 17) added support for mipmaps in the Bitmap class—Android swaps the mip images in your Bitmap when you’ve supplied a mipmap source and have enabled setHasMipMap(). Now in Android 4.3, you can enable mipmaps for a BitmapDrawable object as well, by providing a mipmap asset and setting the android:mipMap attribute in a bitmap resource file or by calling hasMipMap().
一句话总结就是google 建议大家只把 app 的启动图标放在 mipmap 目录中,其他图片资源仍然放在 drawable 下面。
也就是说一些icon图标之类的东西可以放在mipmap里面,其它的还是放在drawable 下面好
- Android开发随身笔记
- 随身笔记
- 随身笔记
- VC6随身笔记
- 多线程随身笔记
- js随身笔记
- oracle随身笔记
- Android随身记
- Android客户端 - 大学城随身购
- Android 小程序:随身记
- 浏览器控制台操作——随身笔记
- 软件开发中能随身的法
- 值得收藏的十二条Jquery随身笔记
- 值得收藏的十二条Jquery随身笔记
- [Android]Android开发笔记
- 随身店---店随身
- 利用智能手机(Android)玩转随身linux
- android开发笔记 -摄像头开发
- EasyPermission___最简单易用的权限请求框架
- 浅谈JSONP跨域请求
- 微博视频、信息流总结
- 第26篇:AngularJS+ui-router实现一个超简单的登陆和跳转的二级路由demo
- 如何在 Azure 中标记 Windows 虚拟机
- Android开发随身笔记
- 当做他是开始
- Java企业面试算法新得体会之链表问题20问
- GNVM版本下载太慢用淘宝镜像速度提百倍哈
- PCA(主成分分析) 降维算法详解 和代码
- websocket头解析
- LeetCode 48. Rotate Image (Medium)
- spring aop获取目标对象的方法对象(包括方法上的注解)
- 12月份的新业务、新系统架构