05-13-2009 09:53 AM
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...
05-13-2009 10:23 AM
Try to use:
Ui.getUiEngine().getActiveScreen()
05-14-2009 07:24 AM
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.
05-14-2009 07:32 AM - edited 05-14-2009 07:32 AM
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
}
05-14-2009 07:34 AM