Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Developer
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook
My Carrier: o2

how to get the device screen width and height?

how to get the device screen width and height in webworks?

Plase "+Like" my post if it was helpful.
Developer
Posts: 29
Registered: ‎09-17-2012
My Device: 9810, 9800, 9700, 9900, 9300
My Carrier: BSNL

Re: how to get the device screen width and height?

For Width: screen.width

 

For Height: screen.height

Thanks & Regards,
Nitish..

Thanks & Regards,
Nitish_Pheonix

Hit like if the above post is helpful to you.
Please Accept this as Solution if the above post is a solution for you.
BlackBerry Development Advisor
Posts: 758
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: how to get the device screen width and height?

Hello,

 

There are a few different ways to do this, but I've always used:

 

width  = window.innerWidth;
height = window.innerHeight;