0
我有一個WebView,我想將其展開爲全屏。用戶將與它交互,所以它在擴展時需要保持某種狀態。理想的過程是這樣的:Android查看層次結構如何工作
- 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
?
如果任何人有一些示例代碼來完成上面描述的展開和摺疊行爲,我會非常感激。謝謝!