SlidingDrawer 在原始屏幕上移动
我的应用程序包含一个屏幕,其中包含一个水平滑动抽屉。 当用户按下抽屉把手时,抽屉应“覆盖”整个屏幕。当它关闭时,“原始”屏幕应该会显示。 我已将抽屉定位在 FrameLayout 中,但手柄消失了。
可以怎样解决呢?
谢谢, 埃亚勒
My application contains a screen which contains a horizental SlidingDrawer.
When user perss on the drawer handle, the drawer should "cover" the whole screen. when it closed, the "original" screen should reveal.
I have located the drawer in a FrameLayout but the handle disappeared.
How it can resolved?
Thanks,
Eyal
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有趣的是,我不久前刚刚解决了这个问题。我花了一段时间,但经过一些谷歌搜索和测试后,我想出了这个:
基本上,我将整个布局放入“相对布局”中,然后在其中为主要内容创建一个“线性布局”。在“相对布局”内部但在“线性布局”外部,我放置了“SlidingDrawer”。我在下面的 xml 中显示了按钮和句柄。另外,我在“SlidingDrawer”中为内容创建了“线性布局”。
在发布此内容之前,我刚刚使用此代码运行了我的测试应用程序并且它有效。如果您有任何疑问,请询问,我希望这会有所帮助。
Funny, I just solved this problem not to long ago. It took me a little while but after some Googling and testing I came up with this:
Basically I put my entire layout into a "Relative Layout" and then created a "Linear Layout" inside of that for the main stuff. Inside the "Relative Layout" but outside of the "Linear Layout" I put my "SlidingDrawer". I am showing the buttons and handle in the xml below. Also, I created a "Linear Layout" in my "SlidingDrawer" for content.
Before posting this, I just ran my test application with this code and it works. If you have any questions, please ask and I hope this helps.