andrioid图片适配 和 导演交流过之后顿悟了。
来源:互联网 发布:从零开始学java 第三版 编辑:程序博客网 时间:2024/05/16 01:28
http://mobile.smashingmagazine.com/
在developer.android.com 上 google 告诉我们 alternative layouts and bitmaps. 告诉了我们换算比例。但是没有告诉我们 基准。
通过和“导演” 交流,通过一张图明白了 基准。。 640*900 《---》 XHDPI
Create Different Bitmaps
You should always provide bitmap resources that are properly scaled to each of the generalized density buckets: low, medium, high and extra-high density. This helps you achieve good graphical quality and performance on all screen densities.
To generate these images, you should start with your raw resource in vector format and generate the images for each density using the following size scale:
- xhdpi: 2.0
- hdpi: 1.5
- mdpi: 1.0 (baseline)
- ldpi: 0.75
This means that if you generate a 200x200 image for xhdpi devices, you should generate the same resource in 150x150 for hdpi, 100x100 for mdpi, and 75x75 for ldpi devices.
Then, place the files in the appropriate drawable resource directory:
MyProject/ res/ drawable-xhdpi/ awesomeimage.png drawable-hdpi/ awesomeimage.png drawable-mdpi/ awesomeimage.png drawable-ldpi/ awesomeimage.png
Any time you reference @drawable/awesomeimage
, the system selects the appropriate bitmap based on the screen's density.
- andrioid图片适配 和 导演交流过之后顿悟了。
- 创建过图片之后一定要释放。
- Andrioid不同分辨率设备的适配320
- 顿悟和感悟
- 我做了一次导演
- Myeclipse30天试用期过了之后如何破解
- WIN XP 开机正常,过了进度条之后黑屏
- 顿悟- -
- 顿悟- -
- 顿悟
- 顿悟
- 顿悟
- 顿悟
- 顿悟
- 详细讲解委托和协议、看了这个我顿悟--很经典!
- Java 抽象类和普通类、接口的区别——看完你就顿悟了
- 【Sorry】出去了几天,耽搁和大家交流了
- 所谓的思想,貌似有点顿悟了
- 好的
- How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ?
- Hibernate是一个开放源代码的对象关系映射框架(ORM)
- splitcontainer 实现窗体上下分割
- OpenGL: 二维中的OBB相交测试
- andrioid图片适配 和 导演交流过之后顿悟了。
- 用基于WebGL的BabylonJS来共享你的3D扫描模型
- MetaQ集群安装测试
- [LeetCode] Convert Sorted Array to Binary Search Tree
- Hibernate 数据库到实体类
- DataGridView单击选中一整行,只能单选,不能选择多行,只能选择一行
- unity开发 --------- c# 基本语法 002
- 用友NC6该产品的用户数已达到产品授权数!
- Word Break II