0
我的布局包含两个线性布局。
如下:在一个布局上显示菜单栏
<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。
我该怎么做?
你能再详细一点吗?什么“菜单栏”应该只显示在l1 LinearLayout上? – 2012-08-13 07:42:28
我是指/ res/menu /文件夹中的* .xml。 – brian 2012-08-13 07:46:50
正常情况下,它将跨越两个布局。 – brian 2012-08-13 07:47:20