摘要: ipad屏幕适配 1.android:screenOrientation="unspecified|portrait|landscape" 2.adb shell getprop ro.sf.lcd_density //dpi=400 sw-xxxx-dp中的xxxx的计算公式是 sw *160/dpi 屏幕分辨率1920X1080 xxxx=1080*160/400=432 2、andr... 阅读全文
posted @ 2017-10-17 20:04 代码の足迹 阅读(1454) 评论(0) 推荐(0) 编辑
摘要: 安卓中像素px和dp的转换: public int Dp2Px(Context context, float dp) { final float scale = context.getResources().getDisplayMetrics().density; //当前屏幕密度因子 return (int) (dp * scale + 0.5f); } publ... 阅读全文
posted @ 2017-10-17 19:21 代码の足迹 阅读(5676) 评论(0) 推荐(0) 编辑
摘要: 1 Android 使用Vector XML文件创建矢量图片资源 2 blog:http://blog.csdn.net/klxh2009/article/details/51121034 3 所需工具: 4 1、阿里巴巴矢量图库(http://www.iconfont.cn/) 5 2、GIMP(GNU Image Manipulation Program) 6 其中,GIMP我提... 阅读全文
posted @ 2017-10-17 19:20 代码の足迹 阅读(1703) 评论(0) 推荐(0) 编辑