2012-01-28 73 views

回答

1

使用的RelativeLayout,并采取三个观INIT:

EachView的的LayoutParams应为:

View1-- ID- @ + ID /厂景 Layout_Width = WRAP_CONTENT Layout_Height = WRAP_CONTENT

视图2:ID- @ + ID /视图2 大号ayout_Width = FILL_PARENT Layout_Height = WRAP_CONTENT toLeftOF = @ + ID/VIEW3 toRightOf = @ + ID /厂景

VIEW3:ID- @ + ID /视图2 Layout_Width = WRAP_CONTENT Layout_Height = WRAP_CONTENT align_parent_right =真

+0

感谢,摸索出伟大的! – 2012-01-28 12:26:47

3

最好的办法将是使用的LinearLayout

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="horizontal" > 

    <View 
     android:layout_width="150px" 
     android:layout_height="fill_parent" 
     android:layout_weight="0"/> 

    <View 
     android:layout_width="0px" 
     android:layout_height="fill_parent" 
     android:layout_weight="1"/> 

    <View 
     android:layout_width="150px" 
     android:layout_height="fill_parent" 
     android:layout_weight="0"/> 

</LinearLayout>