I have a WebView (inside a snippet in ViewPager with SlidingTabLayout).
When using the WebView type, I want the layout to change to make sure the input is visible.
When I press text input in WebView, an on-screen keyboard appears and the layout size changes. I can enter my text and send using the return button to the soft keyboard or cancel the input using the "Back" button. After that, the keyboard disappears, and the layout changes back. Correct the behavior of AdjustResize .
However, dropping the keyboard, going beyond the Softkeyboard (for example, when entering a query in Google and pressing the search button in WebView), the keyboard hides, and it takes about 2-3 seconds to change the layout (leaving an empty space for 2-3 seconds at the bottom my layout). After that, when choosing textinput, the keyboard overlays the WebView (adjustPan).
How can I make sure that when you turn off the keyboard by pressing WebView, the behavior of AdjustResize .
I tried reinstalling AdjustResize (e.g. from onTouch), but this has no effect:
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
I also tried the following solution , but this does not give any changes.
Also, I think this is probably not an issue of attention (since the keyboard appears and the webview responds). And I set focus from my view:
webView.setFocusable(true); webView.setFocusableInTouchMode(true);