Firstly, this is not an easy question, like this quest or this quest .
I need to get a soft keyboard in my project. I used to use the height of the device screen and subtracted it due to the height of the presentation of the root application. However, it works correctly before my test using the keyboard suggestion. Unfortunately, for me the solution in this case is not so. The number I got is greater than the height of the soft keyboard. I tried google but could not.
Here is my picture: 
source share