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: 86
Registered: ‎07-21-2009
My Device: Not Specified

How to get rid of white background left after virtual keyboard?

hi experts,

I am using a virtual keyboard for input. After it is dismissed with the enter key and the screen which

invoked it is popped...

 

I do this:

 

        net.rim.device.api.ui.UiApplication.getUiApplication().getActiveScreen().updateDisplay();

 

for the now top, formerly underlying, screen.

It shows a white background under the top screen exactly  where the virtual keyboard was.

I have also tried using

 

        net.rim.device.api.ui.UiApplication.getUiApplication().getActiveScreen().doPaint();

and this does not get rid of the white background.

 

This happens after I push a screen that brings up the virtual keyboard.

If I don't go to that screen, which pushes the virtual keyboard, I never

have this white background.

 

Any ideas how to fix this?

 

thanks!!!!!!!!

lucidbee

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: How to get rid of white background left after virtual keyboard?

Try calling invalidate() on the screen from onFocus() or onExposed()

 

 

Developer
Posts: 86
Registered: ‎07-21-2009
My Device: Not Specified

Re: How to get rid of white background left after virtual keyboard?

I tried those suggestions and they did not work.

thanks,

lucidbee

Developer
Posts: 86
Registered: ‎07-21-2009
My Device: Not Specified

Re: How to get rid of white background left after virtual keyboard?

I think I see the problem and I wonder if it is a bug.

This is api 4.7 and simulator 9500.

 

I have these steps in my app:

 

(1)   push primary                   (2) push then pop 2nd screen                                 (3) primary on top with white background

 

<app primary screen>   =>   <screen with associated virtual keyboard>   =>   <app primary screen>

                                                   <app primary screen>

 

Above, the screen with an associated virtual keyboard is pushed (modal) then popped.

 

What happens is that the extent for <app primary screen> is CHANGED over this sequence.

The reason I have a white background is that the background image is clipped by this extent change.

 

Now how can I change the extent back to what it should be??

 

Specifically, at (1) the (height, width) of <app primary screen> is (440, 360).

At (3), on return it is (248, 360). This is exactly the screen real estate 'left over' after the

virtual keyboard takes up screen space.

 

How can I get my extent to be the proper extent for <app primary screen> ?

I tried calling sublayout, setExtent, and I get an exception because they are not called by layout().

 

Thanks much!!!!!!!

lucidbee

 

 

 

BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to get rid of white background left after virtual keyboard?

Are you making use of a custom screen or manager for your screen that is not refreshing?  If so, can you provide some sample code?

 

Or are you using the classes witin the BlackBerry API set?

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
Highlighted
Developer
Posts: 60
Registered: ‎08-20-2009
My Device: Not Specified

Re: How to get rid of white background left after virtual keyboard?

Hi lucidbee,

 

I am facing the same problem as you have mentioned. Can you tell how did you resolve this issue?

 

Thank you.