Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 19.0

Index

On this page

KMManager.getKeyboardHeightMax()


Summary

The getKeyboardHeightMax() method returns the maximum allowed height of the keyboard frame for this context.

Syntax

KMManager.getKeyboardHeightMax(Context context)

or

KMManager.getKeyboardHeightMax(Context context, int orientation)

Parameters

context
The context.
orientation (Optional)
Accepts a screen orientation value. This is most useful if you want to get the size of the keyboard in the other (non-current) orientation. If orientation is not defined, maximum keyboard height is returned for the current device orientation.

Returns

Returns the maximum allowed height of the keyboard frame in density-independent pixels (dp).

Description

Use this method to get the maximum allowed height of the keyboard frame.

Examples

Example: Using getKeyboardHeightMax()

The following script illustrate the use of getKeyboardHeightMax():

    int maxKeyboardHeight = KMManager.getKeyboardHeightMax(this);

or

    import android.content.res.Configuration;
    ...
    // Get the maximum allowed Keyman keyboard height for landscape mode.
    int maxKeyboardHeightLandscape = KMManager.getKeyboardHeightMax(this, Configuration.ORIENTATION_LANDSCAPE);

See also