我有一个想要扩展为全屏的 WebView。用户将与它进行交互,因此它需要在扩展时保持某种状态。理想的过程是这样的:
- Remove WebView from its parent
- Put WebView at the top of the current View hierarchy with `FILL_PARENT` for width and height
稍后,我需要把 WebView 放回去:
- 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
我知道getRootView
,但我不知道如何使用它。什么是DecorView
?
如果有人有一些示例代码来完成我上面描述的扩展和折叠行为,我将不胜感激。谢谢!