javascriptandroidandroid-webviewhtml5-fullscreen

WebView after closing fullscreen view, webview auto scrolls to top


I have webveiw (with fullscreen support) on the fragment. The issue is when i close fullscreen the webview scrolls it position to top. Noticed:


Solution

  • For me the issue was that webview have match_perent or wrap_content in height and after applying FLAG_FULLSCREEN webview lose it height. solution was to set layoutParams.height = height before set FLAG_FULLSCREEN

    so, in this case "layoutParams.height" - layout height settings, "height" - current view height