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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
babygodzilla
Posts: 275
Registered: ‎03-10-2009

Display.getHeight() behaving incorrectly in simulator?

[ Edited ]

Really frustrated at this, not sure what I'm doing wrong. I simply have a .PNG image of a 20x20 pixels box whose bottom side I would like to place flat on the bottom of the screen. 

 

To achieve this I set the box's Y-axis position to be at Display.getHeight() - bitmap.getHeight(), but this is not behaving correctly. 

 

Using a JDE 4.3 simulator (a Pearl I think? device whose LCD is taller than is wider), I found the box to be a few pixels above the LCD's bottom part. 

 

Can anyone verify this or tell me what I could possibly be doing wrong?

 

Thanks

Please use plain text.
Developer
simon_hain
Posts: 13,830
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Display.getHeight() behaving incorrectly in simulator?

don't have experience on false values on the pearl, but you may be able to fix this using setStatus on a MainScreen. Only a workaround, but maybe it helps.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.