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
New Developer
Posts: 3
Registered: ‎05-13-2009
My Device: Not Specified

How to determine whether a special character window has popped up on 9500?

Hi there,

I am using BlackBerryGameCanvas of the 4.7 API to paint a custom textfield periodically. Now when a key on the virtual keyboard is held down and the special character window pops up, the part of the pop-up window that lays on the canvas gets drawn over. To prevent this situation I thought stopping the painting action temporarily might help. Is there a way to determine whether such a pop-up window is visible?

 

Many thanks in advance...

Developer
Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to determine whether a special character window has popped up on 9500?

Try to use:

 

Ui.getUiEngine().getActiveScreen()

----------------
if your issue solved set "Solution" mark at the relevant post
New Developer
Posts: 3
Registered: ‎05-13-2009
My Device: Not Specified

Re: How to determine whether a special character window has popped up on 9500?

Thanks for heading me to the right direction.

Although not very clean, I came up with the following solution: I've created a custom class which extends NullField. When this custom class is added to the ActiveScreen, its onObscured method is called everytime the special character pop-up window appears.

Developer
Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to determine whether a special character window has popped up on 9500?

[ Edited ]

I mean to check via instanceof the current active screen.

 

Make a script that gets name of class instance for special characters popup screen.

 

I think it is net.rim.device.api.ui.container.PopupScreen class.

 

So, you can do the following:

 

Screen activeScreen = Ui.getUiEngine().getActiveScreen();

 

if (activeScreen instanceof net.rim.device.api.ui.container.PopupScreen) {

 

     // special characters popup screen is displayed

 

}

Message Edited by rafo on 14-05-2009 03:32 PM
----------------
if your issue solved set "Solution" mark at the relevant post
Highlighted
Developer
Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to determine whether a special character window has popped up on 9500?

You can do this check for example in onObsucred() event handler
----------------
if your issue solved set "Solution" mark at the relevant post