In my Android app I need to cache the (already loaded) content of WebView on pause and then restore it on resume. I wonder how can I do this?
Asked
Active
Viewed 519 times
0
-
Have you tried calling webview.onPause() and webview.onResume() ?? – AndRSoid Jan 19 '14 at 14:09
-
please view link http://stackoverflow.com/questions/9128952/caching-in-android-webview – user3076539 Jan 19 '14 at 14:09
-
Thanks for replies. I'll try both suggestions and let you know. – Karlen Kishmiryan Jan 19 '14 at 15:11
1 Answers
0
It is cached automatically unless you disable. Nothing special needs to be done.
A common problem is that badly designed parent resets the view itself in methods like onStart or onResume, forcing to reload the contents. You need to be careful with the view in these methods, it may already with content.
Audrius Meškauskas
- 20,936
- 12
- 75
- 93
-
Audrius thanks for your answer. Did you mean that I shouldn't implement those methods of the view? – Karlen Kishmiryan Jan 19 '14 at 15:14
-