|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.VirtualKeyboard
public abstract class VirtualKeyboard
For supported devices with touchscreens, the virtual keyboard allows the user to type using
the display in either SureType or QWERTY keyboard mode (depending on device orientation).
A VirtualKeyboard object is a context-specific handle to the system-managed
virtual keyboard. The context for a VirtualKeyboard is a
Screen
, and applications should obtain instances by invoking
Screen.getVirtualKeyboard()
.
Keyboard visibility
In general, applications are not required to actively manage the visibility
of the virtual keyboard. Each Screen
is associated with a VirtualKeyboard object that
contains a default visibility state. However, when a Screen
is initialized, the application can
call VirtualKeyboard.setVisibility(int)
to specify the visibility style for the
context. If the visibility style calls for restoring the previous virtual keyboard
visibility whenever the context is active, the system handles saving and restoring the visibility state.
The visibility styles are:
VirtualKeyboard.HIDE
VirtualKeyboard.SHOW
VirtualKeyboard.HIDE_FORCE
VirtualKeyboard.SHOW_FORCE
VirtualKeyboard.IGNORE
VirtualKeyboard.RESTORE
Keyboard layout
The keyboard layout that is displayed is determined by the edit field styles
and text filters that are set for the field with input focus. See
Field
and BasicEditField
for more information about field
styles, and Keypad.getHardwareLayout()
for more information on keyboard layouts.
Field Summary | ||
---|---|---|
static int |
HIDE
When passed to VirtualKeyboard.setVisibility(int) , indicates the keyboard
should be hidden either the next time the context has focus, or immediately if
the context is already has focus. |
|
static int |
HIDE_FORCE
When passed to VirtualKeyboard.setVisibility(int) , indicates the keyboard
should always be hidden when the context has focus, and that displaying the
keyboard should not be permitted. |
|
static int |
IGNORE
When passed to VirtualKeyboard.setVisibility(int) , indicates the keyboard
visibility should always be ignored when the context is active. |
|
static int |
RESTORE
When passed to VirtualKeyboard.setVisibility(int) , indicates the keyboard
visibility should always be restored to its previous state when the
context is active. |
|
static int |
SHOW
When passed to VirtualKeyboard.setVisibility(int) , indicates the keyboard
should be displayed the next time the context has focus, or immediately if
the context already has focus. |
|
static int |
SHOW_FORCE
When passed to VirtualKeyboard.setVisibility(int) , indicates the keyboard
should always be displayed when the context has focus, and that hiding the keyboard
should not be permitted. |
Method Summary | ||
---|---|---|
abstract int |
getVisibility()
Returns the keyboard visibility when the context has focus. |
|
static boolean |
isSupported()
Indicates that the system supports the virtual keyboard. |
|
abstract void |
setVisibility(int visibility)
Sets the keyboard visibility style that should be used when the context has focus. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HIDE
VirtualKeyboard.setVisibility(int)
, indicates the keyboard
should be hidden either the next time the context has focus, or immediately if
the context is already has focus. Subsequently, the visibility state should be
automatically saved and restored.
When returned by VirtualKeyboard.getVisibility()
, indicates the keyboard
is hidden.
public static final int SHOW
VirtualKeyboard.setVisibility(int)
, indicates the keyboard
should be displayed the next time the context has focus, or immediately if
the context already has focus. Subsequently, the visibility state should be
automatically saved and restored.
When returned by VirtualKeyboard.getVisibility()
, indicates the keyboard
is displayed.
public static final int HIDE_FORCE
VirtualKeyboard.setVisibility(int)
, indicates the keyboard
should always be hidden when the context has focus, and that displaying the
keyboard should not be permitted.
public static final int SHOW_FORCE
VirtualKeyboard.setVisibility(int)
, indicates the keyboard
should always be displayed when the context has focus, and that hiding the keyboard
should not be permitted.
public static final int IGNORE
VirtualKeyboard.setVisibility(int)
, indicates the keyboard
visibility should always be ignored when the context is active. The
system will continue to save the keyboard visibility state, but will not
restore it when the context is active.
public static final int RESTORE
VirtualKeyboard.setVisibility(int)
, indicates the keyboard
visibility should always be restored to its previous state when the
context is active.
Method Detail |
---|
public static final boolean isSupported()
true
if the system supports the virtual keyboard,
false
otherwise.public abstract void setVisibility(int visibility)
visibility
- One of VirtualKeyboard.HIDE
, VirtualKeyboard.SHOW
, VirtualKeyboard.HIDE_FORCE
,
VirtualKeyboard.SHOW_FORCE
, VirtualKeyboard.IGNORE
, or VirtualKeyboard.RESTORE
.
IllegalArgumentException
- when visibility
is not one of the VirtualKeyboard
constants.public abstract int getVisibility()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal