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

Java Development

Reply
Highlighted
Developer
Posts: 34
Registered: ‎08-11-2011
My Device: BlackBerry Bold
My Carrier: Axis
Accepted Solution

Calling UpdateLayout on Manager Causes Entire Screen to Relayout

Hi, I have a fixed size manager that I add to the screen. Everytime the manager is relaid-out because the size of one of its children has changed, the entire screen seems to get relaid-out.

 

How do I make it so that the relayout only happens for the manager's children and not the screens.

 

Here is the stack trace from debugging my application:

 

VerticalFieldManager(Manager).layoutChild(Field, int, int) line: 2743    
VerticalFieldManager.sublayout(int, int) line: 367    
VerticalFieldManager(Manager).layout(int, int) line: 2680    
TitleStatusManager(Manager).layoutChild(Field, int, int) line: 2743    
TitleStatusManager.sublayout(int, int) line: 1025    
TitleStatusManager(Manager).layout(int, int) line: 2680    
MyScreen(Manager).layoutChild(Field, int, int) line: 2743    
MyScreen(Screen).layoutDelegate(int, int) line: 3491    
MyScreen(FullScreen).sublayout(int, int) line: 88    
MyScreen(Manager).layout(int, int) line: 2680    
MyScreen(Screen).runLayoutUpdate0(int, int, int) line: 5816    
TitleStatusManager(Manager).runLayoutUpdate0(int, int, int) line: 3323    
VerticalFieldManager(Manager).runLayoutUpdate0(int, int, int) line: 3323    
MyManager(Manager).runLayoutUpdate0(int, int, int) line: 3323    
HorizontalFieldManager(Manager).runLayoutUpdate0(int, int, int) line: 3323    
HorizontalFieldManager(Manager).runLayoutUpdate(int, int, int) line: 3296    
MyField(Field).updateLayoutHelper() line: 4882    
MyField(Field).updateLayout() line: 4817

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Calling UpdateLayout on Manager Causes Entire Screen to Relayout

well, of course, as the screen contains the manager. if the manager changes its size the screen has to adjust.
----------------------------------------------------------
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
Developer
Posts: 34
Registered: ‎08-11-2011
My Device: BlackBerry Bold
My Carrier: Axis

Re: Calling UpdateLayout on Manager Causes Entire Screen to Relayout

[ Edited ]

The manager size doesn't change though. Only its childrens' does.

How do I tell the screen that the size of this manager is fixed and therefore it should not relayout all the fields.

 

I'm asking this because I have a lot of fields on the screen that gets relaid-out redundantly just because a child on the fixed sized manager is changed.

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Calling UpdateLayout on Manager Causes Entire Screen to Relayout

i don't think there is a way to prevent that.
----------------------------------------------------------
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
Developer
Posts: 34
Registered: ‎08-11-2011
My Device: BlackBerry Bold
My Carrier: Axis

Re: Calling UpdateLayout on Manager Causes Entire Screen to Relayout

Okay. Thank you for that piece of information.