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

Native Development

Reply
Highlighted
Contributor
Posts: 13
Registered: ‎03-30-2013
My Device: BB10 Dev Alpha A
My Carrier: China Mobile
Accepted Solution

How to set like maxHeight = MaxScreenHeight - 200 ?

I am trying to handlie different resolutions, but I don't know how to set a view with height or width like maxHeight = MaxScreenHeight - 200. Can anybody help me? Thank you!

 

If any one can tell me what is the height of TitleBar or ActionBar, I will appreciate it either.

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: How to set like maxHeight = MaxScreenHeight - 200 ?

Hi,

 

If by view you mean a control or a container, then you can attach LayoutUpdateHandler to outer container and bind control's height to layoutUpdateHandler.frame.height

http://developer.blackberry.com/cascades/reference/bb__cascades__layoutupdatehandler.html

 

 

I don't know the exact height of TitleBar or ActionBar, but it can be determined from a screenshot (press all three volume buttons simultaneously to take a screenshot).

 


Andrey Fidrya, @zmeyc on twitter
Contributor
Posts: 13
Registered: ‎03-30-2013
My Device: BB10 Dev Alpha A
My Carrier: China Mobile

Re: How to set like maxHeight = MaxScreenHeight - 200 ?

Thanks a lot! This works for me.