1
我有一個菜單佈局至極包括2個邊界在哪裏設置一些圖標:設置佈局在另一個佈局
MenuView http://img534.imageshack.us/img534/4314/hjcg.png
而另一個佈局至極由一個自定義標題欄上。
我objetive是使用這個攤位佈局創建佈局:
ComposeView http://img845.imageshack.us/img845/2121/d6zp.png
這是XML文件:
MenuView.xml
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<include layout="@layout/custom_tittlebar" >
</include>
<RelativeLayout
android:id="@+id/border_left"
android:layout_width="80dip"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_alignParentLeft="true"
android:layout_gravity="left"
android:
android:background="@drawable/border_cut" >
<ImageView
... />
<ImageView
... />
<ImageView
... />
</RelativeLayout>
<RelativeLayout
android:id="@+id/border_right"
android:layout_width="80dip"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:background="@drawable/border_cut" >
<ImageView
... />
<ImageView
... />
<ImageView
.. />
<ImageView
... />
</RelativeLayout>
custom_titlebar.xm
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="35dip"
android:orientation="horizontal"
android:background="#000000" >
<com.example.medialauncher.DigitalClock
android:id="@+id/digitalClock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginRight="15dp"
android:text="DigitalClock"
android:textSize="10pt"
android:textColor="#00C2FF"
android:layout_gravity="right"
android:layout_alignParentRight="true" />
的proble是不是得到什麼我與圖像avobe解釋,什麼我得到的是:
Fail http://img707.imageshack.us/img707/7541/qore.png
這是,我需要的是custom_titlebar在其他佈局之上。
嘗試在父'layout的末尾包含'custom_titlebar.xml'。 –
它的工作原理,謝謝! – masmic