Android Programming Press on the image to return to the main documentation page.

IME

List of types:

IME

IME

IME includes several utilities that will you help you manage the soft keyboard.
A tutorial with a working example is available here.
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

HeightChanged (NewHeight As Int, OldHeight As Int)
HandleAction As Boolean

Members:


  AddHandleActionEvent (EditText As android.widget.EditText)

  AddHeightChangedEvent

  HideKeyboard

  Initialize (EventName As String)

  SetCustomFilter (EditText As android.widget.EditText, DefaultInputType As Int, AcceptedCharacters As String)

  SetLengthFilter (EditText As android.widget.EditText, MaxLength As Int)

  ShowKeyboard (View As android.view.View)

Members description:

AddHandleActionEvent (EditText As android.widget.EditText)
Adds the HandleAction event to the given EditText.
AddHeightChangedEvent
Enables the HeightChanged event. This event is raised when the soft keyboard state changes.
You can use this event to resize other views to fit the new screen size.
Note that this event will not be raised in full screen activities (an Android limitation).
HideKeyboard
Hides the soft keyboard if it is visible.
Initialize (EventName As String)
Initializes the object and sets the subs that will handle the events.
SetCustomFilter (EditText As android.widget.EditText, DefaultInputType As Int, AcceptedCharacters As String)
Sets a custom filter.
EditText - The target EditText.
DefaultInputType - Sets the keyboard mode.
AcceptedCharacters - The accepted characters.
Example: Create a filter that will accept IP addresses (numbers with multiple dots)

IME.SetCustomFilter(EditText1, EditText1.INPUT_TYPE_NUMBERS, "0123456789.")
SetLengthFilter (EditText As android.widget.EditText, MaxLength As Int)
Sets a filter that limits the maximum length to the specified value.
ShowKeyboard (View As android.view.View)
Sets the focus to the given view and opens the soft keyboard.
The keyboard will only show if the view has received the focus.
Top