Android DIP: Device-independent Pixel Graphics Design How Android Supports Device Displays: UI Design and UX Device Display Concepts: Size, Density, Orientation, DIP size Type small,normal,large,...
分类:
移动开发 时间:
2014-05-25 07:28:50
阅读次数:
458
一、一些基本概念
1、长度(真实长度):英寸、inch
2、分辨率:density 每英寸像素数 dpi(密度)
3、像素:px
4、dip的公式:px /dip=dpi/160 所以 dip 类似于英寸、长度(dp=dip,sp类似于dip) dip=160*inch
dip= 160/dpi * px
当dip一定时,dpi 越大,px就越大...
分类:
移动开发 时间:
2014-05-20 17:04:59
阅读次数:
494
假设有如下分辨率机器:
800 x 480
1024 x 600
1024 x 768
1280 x 800
1920 x 1200
2048 x 1536
总共六种类分辨率机器,如果按照dp为单位来细分可以分为几种呢?
首先通过context.getResources().getDisplayMetrics().density获取到当前机器的屏幕密度,然后通过dp = px/d...
分类:
移动开发 时间:
2014-05-18 05:46:38
阅读次数:
340
android中获取屏幕的长于宽,参考了网上有很多代码,但结果与实际不符,如我的手机是i9000,屏幕大小是480*800px,得到的结果却为320*533
结果很不靠谱,于是自己写了几行代码,亲测一下
测试参数:
测试环境: i9000(三星)
物理屏幕:480*800px
density :1.5
测试代码:
[java] view
...
分类:
移动开发 时间:
2014-05-11 07:17:48
阅读次数:
422
Pixel density题目描述Pixels per inch (PPI) or pixel
density is a measurement of the resolution of devices in various contexts;
typically computer displays...
分类:
其他好文 时间:
2014-05-07 02:23:38
阅读次数:
481
quiver,平面向量场图[x, y, z] = peaks(20);[u, v] =
gradient(z);contour(x, y, z, 10);hold on, quiver(x,y,u,v); hold offaxis image
%令x与y的长度相等在octave-3.6.4-gcc4...
分类:
其他好文 时间:
2014-05-04 19:16:38
阅读次数:
2238
Pixel densityTime Limit: 1000ms Memory limit:
65536K有疑问?点这里^_^题目描述Pixels per inch (PPI) or pixel density is a measurement of
the resolution of devices...
分类:
其他好文 时间:
2014-04-28 07:48:18
阅读次数:
534
本文出处:http://blog.csdn.net/svitter
原题:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2411
题意:给你一个串,让你依据那个串来输出ppi。坑特别多。ppi的计算方法是dp / inches; dp = sqrt(wp*wp + hp * hp);
现在...
分类:
其他好文 时间:
2014-04-27 20:01:20
阅读次数:
655