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

Java Development

Posts: 275
Registered: ‎03-10-2009
My Device: Not Specified

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?



Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
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