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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
Lindigo
Posts: 3
Registered: ‎05-13-2009

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...

Please use plain text.
Developer
rafo
Posts: 507
Registered: ‎07-15-2008

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
Please use plain text.
New Developer
Lindigo
Posts: 3
Registered: ‎05-13-2009

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.

Please use plain text.
Developer
rafo
Posts: 507
Registered: ‎07-15-2008

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
Please use plain text.
Developer
rafo
Posts: 507
Registered: ‎07-15-2008

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
Please use plain text.