摘要:
1.密度(density)①屏幕密度的计算手机像素密度(density)实际上是以单位英寸160个像素作为参考标准,主要密度有0.75,1,1.5,2和3,当密度为2时就表示1英寸有320个像素,Android中通过代码可以获取到屏幕的像素值和密度,根据这些值就可以反向算出屏幕的物理尺寸:屏幕尺寸 = 屏幕对角线的像素值 / (密度*160) = [(长的平方+宽的平方)开根号] / (密度*160) --> dp= px / (density/ 160)简单来说:屏幕密度(density) = 对角线的像素值(px) / 屏幕大小(inch)比如现在的htc one,屏幕分辨率1920 阅读全文
摘要:
1.常用APIMapView(com.baidu.mapapi.MapView),地图控件,显示图片的View,即百度自定义的地图控件。(自定义控件--自定义类,继承view或viewgroup)MapActivity(com.baidu.mapapi.MapActivity),基类,封装了一些地图相关的方法,类似于开发中常用到的BaseActivity,和以上地图控件一起使用。BMapManager(com.baidu.mapapi.BMapManager),地图引擎管理类。GeoPoint(com.baidu.mapapi.GeoPoint),地理坐标类,存放经度和纬度,以微度的整数形式存 阅读全文
摘要:
1.void android.view.View.setTag(Object tag)Sets the tag associated with this view. A tag can be used to mark a view in its hierarchy and does not have to be unique within the hierarchy. Tags can also be used to store data within a view without resorting to another data structure. 阅读全文
摘要:
1.网络权限2.短信发送权限3.判断sd卡状态权限4.写sd卡权限5.接受短信权限,当注册了手机接收短信时对应的广播接受者(receiver)时,需要此权限6.读取系统联系人权限 阅读全文
摘要:
1.接口实现类的命名:接口Inter,它对应的实现类可以命名成:InterImpl2.一些变量名(起名字真是一件头疼的事):result,data,infos3.eclipse常用快捷键alt+PgUp(alt+PgDn):xml编辑预览视图快速切换 阅读全文