Answer the question
In order to leave comments, you need to log in
How to save WebView states when switching between fragments?
The android application uses the standard bottom navigation template (four buttons at the bottom) with fragments, each of which has its own WebView .
How to save WebView states when switching between fragments?
For example, we went into the application -> the WebView of the first fragment was displayed by default -> poked a finger, JavaScript did something - poked the second button, opened the WebView of the second fragment, did the same actions -> poked the first button, switched back to the WebView of the first fragment.
How to make sure that the page does not reload, but displays the result of our actions during the initial work with this fragment?
Answer the question
In order to leave comments, you need to log in
It seems the only option is to keep the link to the webview somewhere outside the fragments (in the activity?), and not recreate it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question