I have an activity which, onclick of a widget, launches another with a WebView. This WebView is rather slow-loading.
What I would like to do is pre-load the contents of the WebView, such that showing it is instantaneous.
I tried the solution suggested here, which would work.. but for the fact that the first screen is best viewed in Portrait, while the WebView is best viewed landscape. And as such, if the screen orientation changes (either by user action or setRequestedOrientation()), the Activity reloads and the first screen is displayed (not what I want at all).
Any ideas?
Then change that behavior. A
WebViewis one reasonable excuse for usingandroid:configChanges="keyboardHidden|orientation"to manage the orientation configuration change. The downside is that you have to deal with all resource changes yourself. On the plus side, your pre-loadedWebViewremains intact.