在 DrawerLayout 上方放置一个视图(在抽屉上方)
Placing a view above the DrawerLayout (above the drawers)
是否可以在整个DrawerLayout
之上放置一个View
?所以即使抽屉打开,视图也会停留在抽屉上方?
Is it possible to place a View
above the whole DrawerLayout
?
是的。考虑以下布局:
<FrameLayout>
<DrawerLayout>
<FrameLayout>
<!-- the content comes here -->
</FrameLayout>
<!-- one or two drawer views comes here - displayed over content-->
</DrawerLayout>
<!-- any views that are here will be painted even over the drawers -->
</FrameLayout>
是否可以在整个DrawerLayout
之上放置一个View
?所以即使抽屉打开,视图也会停留在抽屉上方?
Is it possible to place a
View
above the wholeDrawerLayout
?
是的。考虑以下布局:
<FrameLayout>
<DrawerLayout>
<FrameLayout>
<!-- the content comes here -->
</FrameLayout>
<!-- one or two drawer views comes here - displayed over content-->
</DrawerLayout>
<!-- any views that are here will be painted even over the drawers -->
</FrameLayout>