ime

Property

Common
expect val WindowInsets.Companion.ime: WindowInsets

An insets type representing the window of the software keyboard.

Android
actual val WindowInsets.Companion.ime: WindowInsets

For the WindowInsetsCompat.Type.ime. On API level 23 (M) and above, the soft keyboard can be detected and ime will update when it shows. On API 30 (R) and above, the ime insets will animate synchronously with the actual IME animation.

Developers should set android:windowSoftInputMode="adjustResize" in their AndroidManifest.xml file and call WindowCompat.setDecorFitsSystemWindows(window, false) in their android.app.Activity.onCreate.