5

I know how to detect in android mobile devices when keyboard is shown, but how can I do that on android tv, or fire tv?

Ultimo_m
  • 4,724
  • 4
  • 38
  • 60

1 Answers1

0

Try this

fun isKeyBoardVisible() = ViewCompat.getRootWindowInsets(requireView())?.isVisible(WindowInsetsCompat.Type.ime()) ?: true
sadat
  • 4,004
  • 2
  • 29
  • 49