If the onFocusNotify method for a Screen is overridden, the virtual keyboard always stays on the screen, and setting the virtual keyboard visibility using the VirtualKeyboard.setVisibility method has no effect.
The VirtualKeyboard.setVisibility method call sets the virtual keyboard's visibility. These changes are applied to the virtual keyboard when the context has focus. When onFocusNotify is overridden, the focus notification is no longer propagated to the super classes and thus the visibility changes are not applied to the virtual keyboard.
When you override the onFocusNotify method for a Screen, the overriding method must call super.onFocusNotify.