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

Android™ Runtime Development

Reply
Regular Contributor
Fraggle222
Posts: 84
Registered: ‎01-31-2013
My Device: Simulator !!!

Blackberry 10 Dev Alpha Simulator: Screen size in pixels: 864 x 1400 ?????

Programatically the screen size in pixels is showing as 864 x 1400. I thought this was supposed to be 768 x 1280.

 

This is how I'm getting it.

Display display = getWindowManager().getDefaultDisplay(); 

        int width = display.getWidth();  // deprecated

        int height = display.getHeight();  // deprecated

 

By the way the dpi is comming out as 359 which is expected and its considered "large" size and "xhdpi".

 

Oh and on my Mac, even scaled to 100% (ves-zoom 100 command), it is not 864 x 1400 or 768 x 1280, but smaller.

 

Anybody have info on this?

Trusted Contributor
basitj
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10

Re: Blackberry 10 Dev Alpha Simulator: Screen size in pixels: 864 x 1400 ?????

My Dev Alpha B is returning 640x384 . Now this is wierd.

 

Get Speedometer on your phone. http://www.speedometer.mobi
Retired
jjasmann
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B

Re: Blackberry 10 Dev Alpha Simulator: Screen size in pixels: 864 x 1400 ?????

Hey there, I just thought I'd provide my own results.

 

Simulator, version 10.1.x.1483

Width: 768

Height: 1280

 

Z10, version 10.1.0.4327

Width: 768

Height: 1280

 

Dev Alpha B, version 10.2.0.341

Width: 768

Height: 1164

 

---

 

Keep in mind that the method that you've chosen to use is now deprecated and my Dev Alpha B is running beta software.

 

Reference: http://developer.android.com/reference/android/view/Display.html#getWidth()

Reference: http://developer.android.com/reference/android/view/Display.html#getHeight()

 

---

 

What versions of the Simulator and Dev Alpha B are you using?

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com