Hi there, I'm trying to maintain the navigation and scrollstate of a WebView but haven't manage to make it work so far. I decided to hoist the webView and webViewClient to the parent composable but when switching tab, the webview doesn't seem to come back to its previous state.Any idea what would cause such problem ?
AFAIK WebView doesn’t save/restore scroll position even with the “old” View system.
Only way I could ever get around this is to somehow keep the instance of the WebView object alive (i.e. don’t let it be garbage collected and then recreated).
1 year ago
Thanks @julioromano. How would you recommend to do so ? I've done some test storing the webView in a Singleton but it doesn't seem to work.