Search code examples
androidandroid-softkeyboard

Get the height of virtual keyboard in Android


How can I get the height of virtual keyboard in Android? Is it possible?

I try to get it from the main window, but it gives me full height of the application. But I want to get the keyboard height.


Solution

  • You can't get the keyboard height, but you can get the height of your View, which is what you really want - and you'll get this data supplied to the onLayout call into the current view.