this is my layout (image):
http://i.imgur.com/j8sqo.jpg
What I want to do is make 1st LinearLayout 50dip high (this is already normal), and then 3rd LinearLayout also 50dip from bottom to top, and then make a second LinearLayout fill the remaining space between them. How to do it?
This is my XML:
<LinearLayout android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="50dip" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" > </LinearLayout> <LinearLayout android:id="@+id/linearLayout2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_below="@+id/linearLayout1" android:orientation="vertical" > <ViewFlipper android:id="@+id/viewFlipper1" android:layout_width="match_parent" android:layout_height="fill_parent" > <ImageView android:id="@+id/imageView1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/rain1" /> <ImageView android:id="@+id/imageView2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/thunder1" /> </ViewFlipper> </LinearLayout> <LinearLayout android:id="@+id/linearLayout3" android:layout_width="fill_parent" android:layout_height="50dip" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_below="@+id/linearLayout2"> </LinearLayout> </RelativeLayout>
source share