菜单栏显示在一个布局上



我的布局包含两个线性布局。
如下:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >
    <LinearLayout
        android:id="@+id/l1"
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="right"
        android:orientation="vertical" >
        <Button
            android:id="@+id/b1"
            android:layout_width="18dp"
            android:layout_height="match_parent"
            android:text=" ﹒﹒﹒"
            android:textSize="20dp" />
    </LinearLayout>
    <LinearLayout
        android:id="@+id/l2"
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="#000000"
        android:orientation="vertical" >
    </LinearLayout>
</LinearLayout>

有 l1 和 l2。
我想让我的菜单栏只属于 l1 并在 l1 上显示。
但不显示 l1 和 l2 的交叉。
我该怎么做?

您无法控制菜单选项的布局。唯一的选择是为要实现的目标定义自定义菜单。

最新更新