2012-01-09 66 views
0

我需要为我的android应用程序创建一个自定义标题。 我会创造像带流体标题的android布局

+----------------+------------+ 
|    |   | 
| background  | Logo  | 
| repeat  | fixed | 
|    | right | 
+----------------+------------+ 
|        | 
|        | 
|  content (list)  | 
|        | 
|        | 
|        | 
+-----------------------------+ 
|  footer repeat  | 
+-----------------------------+ 

现在我有写列表中的XML,但我有头有问题,因为我不知道我怎样才能建造它

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

<RelativeLayout 
    android:id="@+id/top_control_bar" 
    android:layout_width="fill_parent" 
    android:layout_height="88dp" > 

    <View xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="fill_parent" 
     android:layout_height="20dp" 
     android:background="@drawable/top_menu_bg_tile"/> 

    <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="88dp" 
     android:src="@drawable/top_menu" />  

</RelativeLayout> 

<RelativeLayout 
    android:id="@+id/bottom_control_bar" 
    android:layout_width="fill_parent" 
    android:layout_height="28dp" 
    android:layout_alignParentBottom="true"> 

    <ImageView 
     android:layout_width="match_parent" 
     android:layout_height="28dp" 
     android:layout_alignParentBottom="true" 
     android:src="@drawable/bottom_menu" /> 

</RelativeLayout> 

<ListView 
    android:id="@android:id/list" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_above="@id/bottom_control_bar" 
    android:layout_below="@id/top_control_bar" > 
</ListView> 

我还需要知道,如果相对布局是最好的方式o我需要编写一个tablelayout。

回答