mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 08:25:32 +00:00
1.2 KiB
1.2 KiB
| title |
|---|
| KMManager.getNavigationBarHeight() |
Summary
The getNavigationBarHeight() method returns the height of the navigation bar corresponding to the in-app or system keyboard.
Syntax
KMManager.getNavigationBarHeight(Context context, KeyboardType keyboardType)
Parameters
context- The context.
keyboardType- The keyboard type.
KEYBOARD_TYPE_INAPPorKEYBOARD_TYPE_SYSTEM.)
Returns
Returns the height of the navigation bar in pixels.
Description
Use this method to get the height of the navigation bar, which depends on the keyboard type (in-app or system) and navigation mode (gesture, 2-button, or 3-button navigation). The keyboard offsets must account for this height below the keyboard.
Examples
Example: Using getNavigationBarHeight()
The following script illustrate the use of getNavigationBarHeight():
int navigationHeight = KMManager.getNavigationBarHeight(this, KeyboardType.SYSTEM_KEYBOARD);
outInsets.contentTopInsets = inputViewHeight - bannerHeight - kbHeight - navigationHeight;