Android - 重叠相邻的 LinearLayouts、覆盖 LinearLayouts

发布于 2024-12-06 10:34:30 字数 565 浏览 3 评论 0原文

我正在移植一个 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.

enter image description here

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文