ЕГ
Size: a a a
ЕГ
VL
onCreate и onResume и взгляните на экран в этот момент)ЕГ
onCreate и onResume и взгляните на экран в этот момент)
VL
ЕГ
ЕГ
VL
ЕГ
ЕГ
VL
ЕГ
ЕГ
ЕГ
ЕГ
ЕГ
VL
fun isKeyboardShown(window: Window): Boolean {
    window.decorView.apply {
        val r = Rect()
        getWindowVisibleDisplayFrame(r)
        val dm: DisplayMetrics = resources.displayMetrics
        /* heightDiff = rootView height - status bar height (r.top) - visible frame height
         (r.bottom - r.top) */
        val heightDiff: Int = bottom - r.bottom
        /* Threshold size: dp to pixels, multiply with display density */
        return heightDiff > SOFT_KEYBOARD_HEIGHT_DP_THRESHOLD * dm.density
    }
}VL
ЕГ
VL
ЕГ