Android SlidingDrawer 位于通知栏顶部(或切换该滑块的可见性)
我目前正在开发一个非全屏应用程序(通知栏可见)。在我的大多数活动的底部,我有一个滑动抽屉,可以打开一种仪表板。到目前为止,这个滑动抽屉是主relativelayout的一部分,并且可以很好地显示/隐藏。但是,当然,它会扩展到通知区域的底部。
我需要这个滑动抽屉来覆盖通知栏,以便它占据整个屏幕。也许通过将其附加到主布局而不是活动布局?
另一种可行的方法是在滑动抽屉打开时隐藏通知栏(可能使用动画将其向上滑动)并在抽屉关闭时将其显示回来。
有人成功做到过这样的事情吗?
I am currently developing an application which is not fullscreen (Notification bar is visible). On the bottom of most of my activities, I have a sliding drawer that brings up a kind of dashboard. As of now, this sliding drawer is part of the main RelativeLayout and shows/hides fine. However, of course, it gets expanded up to the bottom of the notification area.
I would need this sliding drawer to cover the notification bar in order for it to take the whole screen. Maybe by attaching it to the main Layout instead of the activity Layout?
Another way that would be ok would be to hide the notification bar (maybe using an animation to slide it up) when the sliding drawer is opening and show it back when the drawer is closing.
Has anybody managed to do such a thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法在通知栏顶部绘制视图。您可以通过使应用程序全屏显示来隐藏它,但仅此而已。
You cannot draw Views on top of the notification bar. You can hide it by making your application fullscreen, but that's all.