I've successfully attached WebView to my Kivy app following Kivy wiki instructions. It works as expected, but I'd like to deattach and return to my normal Kivy ui. How to I do that?
I've tried to explore WebView documentation, accessing it's methods (the WebView.destroy() complains about destroying a WebView that's still attached), it's parent methods (I'm not even sure if that's the way to go), but I couldn't get rid of the WebView.
Ok, I'm not sure whether this is the best solution, or clean enough, but the only one I know that works. While it works and seems stable, it needs further testing by someone with better knowledge of Kivy and Android API itself.
I'm creating WebView when entering MyScreen(Screen), and when detaching WebView, switching back to some other Screen.
The view before WebView gets cached (is this efficient? probably would be better to access it some other way) and used again when WebView is destroyed. The quit_screen() calls maybe should be moved to detach_webview(), but the code as a whole probably needs better organization, so leaving it as it is, since this is tested sample.