Android - 重叠相邻的 LinearLayouts、覆盖 LinearLayouts
我正在移植一个 iOS 应用程序,因此设计几乎不在我的掌握范围内。我有两个 LinearLayout,其中一个基本上是一个凹凸(如图所示),我想与第二个 LinearLayout 重叠。
我在美学上得到了我想要的东西,我希望使用 FrameLayout 来包含这两个布局。但是,在这里我遇到了两个功能问题。首先,我需要能够允许由五个相邻图像按钮组成的底部重叠的 LinearLayout 更改大小(最好使用layout_weight)。第二个是顶部 LinearLayout 底部的任何内容,它被底部 LinearLayout 隐藏。
当我切换到使用 LinearLayout 时,从 FrameLayout 包含这两个布局,我在功能上得到了我想要的,但是,在美观上它破坏了按钮以适应。
两种情况均如图所示。感谢所有反馈。我希望在不设计自定义小部件的情况下找到解决方案。
谢谢。
I am porting an iOS application so the design is pretty much out of my hand. What I have is two LinearLayouts, one with what is basically a bump (shown in pictures) that I want to overlap the second LinearLayout.
I get aesthetically what I want desire I use FrameLayout to contain the two layouts. However, here I run into two functional problems. The first, I need to be able to allow the bottom, overlapping LinearLayout which is composed of five adjacent image buttons to change size (preferably, using layout_weight). The second is anything that is in the bottom of the top LinearLayout it is hidden by the bottom LinearLayout.
When I switch to using LinearLayout, from FrameLayout to contain the two I get functionally what I want, however, aesthetically it smashes the button to fit.
Both cases are pictured. All feedback is appreciated. I am hoping to find a solution to this without designing a custom widget.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论