Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 20.0Version 19.0

Index

On this page

You are viewing documentation of version 20.0, which is not included in the latest version. Click here to open the index page for version 18.0.

KMManager.setInputType()


Summary

The setInputType() method allows the engine to configure which predictive-text features will be presented to the user based upon the type of input expected for an input field.

Syntax

KMManager.setInputType(KeyboardType keyboardType, int inputType)

Parameters

keyboardType
The keyboard type. KEYBOARD_TYPE_INAPP or KEYBOARD_TYPE_SYSTEM.
inputType
An integer defining the basic context type of text being edited.

Description

Use this method to allow the engine to determine what types of suggestions may be offered to the user. It will disable predictions for contexts that should not provide them, such as password fields. It will prevent autocorrect for contexts where text prediction will not likely give a perfect result, such as email fields.

Example: Using setInputType()

The following script illustrates the use of setInputType():

    KMManager.setInputType(textView.getInputType());

History

Added syntax in Keyman Engine for Android 19.0.