A fullscreen activity has adjustResize attribute. When user types a text, adjustResize lifts a window content.
In general this effect is desired. But in the top of activity I placed a logotype and I want to redraw it when the keyboard appears on the screen. To redraw a logotype, I need to know vertical offset of the window.
Android obviously keeps somewhere vertical offset, but I can't find where. Any ideas ?
To fix an issiue, which you mentioned, I used a timer to control getWindowVisibleDisplayFrame. Non elegant way, but works.
Just now I am interesting in calculations. I assumed that OS lifts window until the bottom of textbox become visible. This allows to calculate "view's vertical offset" and to reduce logotype size.
But to use assumptions is a bad style. So, my question is, where Android keeps "vertical offset" ?
The proper way to handle this case is with the HeightChanged event of the IME library. This also gives you the size. As you found out it doesn't work with full screen activities.
I do not know whether it is possible to get the adjustPan offset.