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
Developer
Posts: 130
Registered: ‎10-26-2010
My Device: Blackberry Bold 9700

Manager handling

Hi to all ,

 

I am developing a UI in which i am using managers , but these manager are bot working very good for me.

I have some repainting issue on the change of Display orientation  , Can anyone help me about it , 

Another question does using too many mangers have bad effect on performs means does it make my code slow ??

 

regards

Developer
Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: Manager handling

See this link for repaint issue in orientation.
http://supportforums.blackberry.com/t5/Java-Development/IMAGE-NOT-OCCUPYING-ENTIRE-WIDTH-AFTER-TILT/...

And i don't think that adding number of managers will affect the execution process.

Regards.
Developer
Posts: 94
Registered: ‎07-08-2011
My Device: Many

Re: Manager handling

The paint method is called every time something changes on screen so it should have the least amount of code posible. The performance issue can be because of that.
You should try removing from the paint method all the code you can.

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.

Juanma 

@juanmab

Developer
Posts: 130
Registered: ‎10-26-2010
My Device: Blackberry Bold 9700

Re: Manager handling

Hi to all

 

thanks for your replies

 

Your replies are quite helpful.I have two managers on change of orientation i call invalidate() for each manager in the pain () method of the screen.

But its not working . Am i missing something??

 

Reagrds

 

Highlighted
Developer
Posts: 94
Registered: ‎07-08-2011
My Device: Many

Re: Manager handling

I'm still learning but as far as I know invalidate will call pain() so you should put invalidate outside paint() (or subpaint()) and put it in layout() (or sublayut())

By doing this, each time the layout changes (orientation for example) you will  call paint() and the height and width will be recalculated.


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.

Juanma 

@juanmab