1

我想这张照片几乎解释了它:这样的事情可能吗?

在此处输入图像描述

4

3 回答 3

2

Not really, as you can't have any type of Layout with this shape. But you can cheat a bit and make user to think it is like this. Just set content in layout B in the way you want.

于 2013-06-26T08:41:11.097 回答
0

您可以使用 aRelativeLayout来实现这种布局。

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#00FFFF"
        android:orientation="vertical" >
    </LinearLayout>

    <LinearLayout
        android:layout_width="200dp"
        android:layout_height="300dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:background="#FF0000"
        android:orientation="vertical" >
    </LinearLayout>

</RelativeLayout>
于 2013-06-26T08:40:19.630 回答
0

没有什么能阻止您像 Krrishnaaaa 的回答那样拥有重叠的布局。

根据Views您想要保留的内容,您可以尝试与这些类似的操作,将片段 B 拆分为两个单独的:

小片段

水平全宽片段

于 2013-07-02T21:54:30.673 回答