一、基本概念dip : device independent pixels ,设备无关像素。既然是设备无关,我还是觉得device靠谱。dp :就是dippx : 像素不多说 dpi :dots per inch , 直接来说就是一英寸多少个像素点。常见取值 120,160,...
分类:
其他好文 时间:
2014-07-14 17:48:45
阅读次数:
347
dp(dip): device independent pixels(设备独立像素). 不同设备有不同的显示效果,这个和设备硬件有关,一般我们为了支持WVGA、HVGA和QVGA 推荐使用这个,不依赖像素。dp也就是dip,这个和sp基本类似。如果设置表示长度、高度等属性时可以使用dp 或sp。但如...
分类:
移动开发 时间:
2014-07-13 11:21:27
阅读次数:
200
学习Graphics中遇到位图(Bitmap)中getPixels()方法,对该方法的用法大体理解,但对其中的stride参数却不明白具体的用法以及用意,现记述过程如下:getPixels()方法的用处为获取位图(Bitmap)中的像素值(颜色值),存入类型为int的pixels数组中,至于从RGB...
分类:
其他好文 时间:
2014-07-12 13:52:02
阅读次数:
347
方法scrollTo: (内容的左上角)达到某个地点scrollBy: 根据当前位置,再移动多少属性:mScrollX, 以下是文档解释The offset, in pixels, by which the content of this view is scrolled horizontally....
分类:
移动开发 时间:
2014-06-26 19:52:04
阅读次数:
252
1.当进行到生成上传包即:点击product》》archive 》》validation时;先是出现“the bundle does not contain an app icon for iphone / ipod touch of exactly '120x120' pixels”的错误解决方法...
分类:
移动开发 时间:
2014-06-25 18:58:03
阅读次数:
271
本文主要讲的是android中长度单位(dp、px、sp)的用法。1、px:pixels(像素) (1)、不同的设备不同的显示屏显示效果是相同的 (2)、这是绝对像素,是多少就永远是多少不会改变。 一般我们形容屏幕的分辨率,例如分辨率800*480,实际表示改手机屏幕在高度上有800个像素,宽度上....
分类:
移动开发 时间:
2014-06-25 18:22:01
阅读次数:
346
先给我们的自定义ViewGroup定制两个属性
attrs.xml
给自定义的属性来个默认值
dimens.xml
10dp
10dp
自定义的...
分类:
其他好文 时间:
2014-05-22 12:08:48
阅读次数:
249
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
可以指定单位:
setTextSize(int unit, int size)
TypedValue.COMPLEX_UNIT_PX : Pixels
TypedValue.COMPLEX_UNIT_SP : Scaled Pixels
TypedValue.COMPLEX_UNIT_DIP : Device Independent Pixels
mText.setTextSize(...
分类:
移动开发 时间:
2014-04-29 13:22:20
阅读次数:
345
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