Keyboard Support

Contact and Search Homepage

Header bottom

Other versions
Version 18.0Version 17.0 (current version)Version 16.0Version 15.0


On this page



The applyKeyboardHeight() method sets the height of the keyboard frame for the device's current screen orientation (portrait vs landscape).


KMManager.applyKeyboardHeight(Context context, int height)


The context
The height of the keyboard frame in density-independent pixels (dp)


Use this method when you want to increase or decrease the keyboard height for the device in the current screen orientation. This height is independent from the height of the suggestion banner frame.

For reference, here's a table of the default Keyman keyboard heights for various devices and screen orientation.

Device Type and Screen Orientation Default height (dp)
Default handset in portrait 205
Default handset in landscape 150
7" tablet in portrait 305
7" tablet in landscape 200
10" tablet in portrait 405
10" tablet in landscape 300

Note: This new keyboard height would be applied for all platforms, so an adjusted keyboard height for a phone would appear too small for a tablet.


Example: Using applyKeyboardHeight()

The following script illustrates the use of applyKeyboardHeight():

    // Increase the Keyman keyboard height (default Keyman value for most phones is 205dp)
    int newKeyboardHeight = 300;
    KMManager.applyKeyboardHeight(this, newKeyboardHeight);

See also