VideoEnabledWebView icon indicating copy to clipboard operation
VideoEnabledWebView copied to clipboard

After closing fullscreen view, webview auto scrolls to the top

Open SiarheiSm opened this issue 4 years ago • 3 comments

If video iframe belove some other content (text and ect) after closing fullscreen webview auto scrolls to the top of the page. There is no issue if not apply FLAG_FULLSCREEN. is there is a way to make it working with FLAG_FULLSCREEN?

SiarheiSm avatar Mar 01 '20 07:03 SiarheiSm

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 FLAG_FULLSCREEN

SiarheiSm avatar Mar 02 '20 14:03 SiarheiSm

Can you share source code ?

TestereNecmi avatar Mar 11 '20 07:03 TestereNecmi

other solutions,

//when going fullscreen
int positionY = webView.getScrollY();

//when exiting fullscreen
 webView.postDelayed(new Runnable() {
                        @Override
                        public void run() {
                            webView.scrollTo(0, positionY);
                        }
                        // Delay the scrollTo to make it work
                    }, 800);

erengms avatar Aug 26 '22 07:08 erengms