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: 146
Registered: ‎07-24-2008
My Device: none
My Carrier: none

Graphics corruption on Blackberry PearlFlip 8220

Hi All

 

I am working on porting of one application on Blackberry PearlFlip device 8220 f/w version 4.6.0.200 (platform 4.1.0.71).

I have one class LoadingScreen which extends the MainScreen class. Following is the sublayout method of that class.

 

public void sublayout(int width, int height) {
                screenwidth = Display.getWidth();
                screenheight = Display.getHeight();
                setExtent(screenwidth, screenheight);
                setPosition(0, 0);
                setBackground(BackgroundFactory.createSolidTransparentBackground(0xFFFFFF, 0));
                showConnecting(); // this method adds the fields to this class.
                layoutDelegate(screenwidth, screenheight);
        }

 

This screen only draws (paints) the bottom part and top part is transparent so that the previous screen is displayed.

I am seeing the UI corruption issue at two point.

 

1: When the ticker thread is running in the screen below the Loadingscreen to display the long name in the list .

 I fixed this by pausing the ticker thread once the Loading screen comes on top of it.

 

2: When a system pop up is diplayed for example when the app makes a HTTPSConnection a system popup is displayed for trust the certificates. When the system popup disappears the UI get distorted.

     I am not sure how to fix this.

 

Is this possible to stop the repainting of previous screen so that only the top scren gets repainted.

 

Also i observed when the Loading screen is on the top of the screen and if i closed the flip and again open it the the first screen is appears first and after a shortwhile the Loadingscreen apeears.

 

Anybody has any idea what is happening here and how to resolve this repainting issue.

 

 

Thanks

Ankit

 

 

 

 

 

Thanks & Regards,
Ankit Dubey
Module Lead Software Engineer, mLabs
Impetus InfoTech (India) Pvt. Ltd.
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Graphics corruption on Blackberry PearlFlip 8220

Fields shouldn't be added within the sublayout method.  This can cause an endless loop (sublayout would be called to layout the screen after the new fields are added, which adds more fields, etc...).

 

You can stop your animation of screens below by overriding the onObscured method within those screens to detect when a screen appears on top of it.  Override onExposed to detect when the screen is back on top of the stack.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 146
Registered: ‎07-24-2008
My Device: none
My Carrier: none

Re: Graphics corruption on Blackberry PearlFlip 8220

Thanks Mark for replying.

I fixed the repainting issue by decreasing the screen repainting time. Also i will take care not to add the fields in sublayout. Thanks for the info.

 

Ankit

 

Thanks & Regards,
Ankit Dubey
Module Lead Software Engineer, mLabs
Impetus InfoTech (India) Pvt. Ltd.