Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 606 Bytes

File metadata and controls

18 lines (17 loc) · 606 Bytes

com.zhxjz.map.plugin.captureScreenSize

获取屏幕尺寸大小
用法:
1.获取屏幕尺寸大小
captureScreenSize.getScreenSize(function(point){
var screenWidth = point[0];
var screenHeight = point[1];
},function(){alert('error')});

2.获取状态栏(statusbar)的高度
captureScreenSize.getStatusBarHeight(function(point){
var barHeight = point[0];
},function(){alert('error')});

备注:
在cordova-hybrid模式下,js获取不到屏幕的真实尺寸,需要调用原生获取返回

enjoy it :)