开发者

How to get physical size of Screen?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜