开发者

Prevent WebView to scroll up when reload it

开发者 https://www.devze.com 2023-03-31 00:25 出处:网络
I need to loadDataWithBaseURL many times but I don\'t want WebView scrolls up. How to do it? I guess I should cach开发者_开发问答e the scrollbar position and restore it every time WebView finishs rel

I need to loadDataWithBaseURL many times but I don't want WebView scrolls up. How to do it? I guess I should cach开发者_开发问答e the scrollbar position and restore it every time WebView finishs reloading but WebView doesn't have any methods like "setOnAfterLoadingListener".


It has onPageFinished(WebView view, String url) in WebViewClient although I don't know if it's triggered when reloading.

0

精彩评论

暂无评论...
验证码 换一张
取 消