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: 166
Registered: ‎01-14-2009
My Device: Curve 8330
Accepted Solution

screen.paint show empty bitmap

[ Edited ]

Hello,

I'm trying to make some screen transition animation but I can't find a way to do the same thing the method doLayout does. I'm working with the OS 4.5 on Curves 8300 and the method doLayout doesn't exist in the API.

 

I've tried updateLayout, invalidateLayout, doPaint and nothing is working. I don't want the screen to be visible before the end of the transition so I can't use the Display.screenshot() method.

 

Here is the method I'm using. The graphics is a part of a bitmap. With OS 4.1, I was doing super.doLayout just before first paint method. 

 

 

public void getScreenShot(Graphics graph) { super.paintBackground(graph); super.paint(graph); }

 

 

 

Message Edited by SamuelD on 09-28-2009 03:17 PM
Thank you, have a nice day.

--
Samuel D.
Highlighted
Developer
Posts: 166
Registered: ‎01-14-2009
My Device: Curve 8330

Re: screen.paint show empty bitmap

[ Edited ]

Hello again,

I've found a solution to my problem. Just put this part of code before super.paintBackground(graphics);

 

 

if (super.getWidth() == 0) { super.layoutDelegate(Display.getWidth(), Display.getHeight());}

 


 

Message Edited by SamuelD on 09-29-2009 04:12 PM
Thank you, have a nice day.

--
Samuel D.