I have a WebView that I would like to expand to fullscreen. The user will interact with it, so it needs to maintain some sort of state when it expands. The ideal process is this:
- Remove WebView from its parent
- Put WebView at the top of the current View hierarchy with `FILL_PARENT` for width and height
Later, I will need the put the WebView back:
- Remove WebView from top of the hierarchy
- Restore the old hierarchy
- Put WebView back where it was with its previous setting for width and height
I know about getRootView
, but I don't know how to use it. What's a DecorView
?
If anyone has some sample code to accomplish the expanding and collapsing behavior I've described above, I'd be really grateful. Thanks!