开发者

How to get physical size of Screen?

开发者 https://www.devze.com 2023-03-20 22:37 出处:网络
For BlackBerry and Android. How开发者_Go百科 to get physical width and height of Screen (not resolution) in inches or centimeters?

For BlackBerry and Android.

How开发者_Go百科 to get physical width and height of Screen (not resolution) in inches or centimeters?

Is there any method to do it?

Many thanks !


Use for Blackberry ::

import net.rim.device.api.system.Display;

int DeviceHeight = Display.getHeight();
int DeviceWidth = Display.getWidth();

for Android ::

Display display = getWindowManager().getDefaultDisplay(); 

int DeviceHeight = display.getHeight();
int DeviceWidth = display.getWidth();
0

精彩评论

暂无评论...
验证码 换一张
取 消