1. dpi是dot per inch,每英寸多少点,ppi是 Pixel per inch,每英寸像素数,针对显示器的设计时,dpi=ppi。
而安卓代码中常用density(点密度)来表示。ppi的计算方式呢可以根据勾股定理以及小学数学知识就能算出了哈哈,
例如小米2s分辨率1280*720,4.3寸。
这样的话可以得到ppi=(√1280^2+720^2)/4.3=341.53...
分类:
其他好文 时间:
2014-11-22 14:42:32
阅读次数:
298
启动:
startActivity(intent);
overridePendingTransition(R.anim.tran_next_in, R.anim.tran_next_out);
退出:
@Override
public void finish() {
// TODO Auto-generated method stub
super.finis...
分类:
移动开发 时间:
2014-11-22 12:07:47
阅读次数:
179
//RootViewController.m- (void)viewDidLoad { // Do any additional setup after loading the view. [super viewDidLoad]; // Do any additional setu...
分类:
其他好文 时间:
2014-11-22 00:46:54
阅读次数:
246
- (void)viewDidLoad{ [super viewDidLoad]; UITapGestureRecognizer *gesture=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(Close.....
分类:
移动开发 时间:
2014-11-22 00:38:34
阅读次数:
168
重定向,也就是把图像中的像素从一个地方对应到另一个地方 To accomplish the mapping process, it might be necessary to do some interpolation for non-integer pixel locations, since t...
分类:
移动开发 时间:
2014-11-21 18:24:17
阅读次数:
155
Given an image represented by an NxN matrix, where each pixel in the image is4 bytes, write a method to rotate the image by 90 degrees. Can you do thi...
分类:
其他好文 时间:
2014-11-21 14:01:17
阅读次数:
119
同样代码表现的不同行为创建基类(Super)和派生类(Sub)每个类有一个字段field和一个公共方法getField,并且使用内联的方式初始化为1,方法getField返回字段field。C#和Java代码及运行结果如下C#复制代码 class Super { public int fi...
代码:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"验证邮箱的合法性"; //最全面的验证邮箱...
分类:
其他好文 时间:
2014-11-20 16:52:53
阅读次数:
159
matplotlib,numpy,scipy是做数据挖掘的基本python库,在安装时我碰到了不少麻烦,尤其是在python 3.4中。 按照如下顺序安装1,2,3,import matplotlib库出现问题时依次安装4,5,6可以解决问题。1、numpy-1.8.1-win32-super...
分类:
其他好文 时间:
2014-11-19 15:49:55
阅读次数:
235
代码:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"验证邮箱的合法性"; NSString *...
分类:
其他好文 时间:
2014-11-19 15:47:26
阅读次数:
162