<script> var phoneWidth = parseInt(window.screen.width); var phoneHeight = parseInt(window.screen.height); var phoneScale = phoneWidth/750; //除以的值按手机的物理分辨率 var ua = navigator.userAgent; if (/Android (\d+\.\d+)/.test(ua)) { var version = parseFloat(R
今天突然发现,图片放在drawable 不同分辨率的目录下会有不同程度的放大或者缩小?这是为什么呢? 首先我们从decodeResource()方法入手 public static Bitmap decodeResource(Resources res, int id, Options opts){ //.... final TypedValue value = new TypedValue(); is = res.openRawResource(id, value); bm = decodeR