Split screen in two
<p>I am trying to split my layout into two halves.When I try layout_weight,in splits it into  two horizontal halves.How do i split the layout into two vertical halves.</p>

<pre><code>          &lt;?xml version="1.0" encoding="utf-8"?&gt;
</code></pre>

<p>

<pre><code>android:id="@+id/linearLayout123" android:layout_width="fill_parent"
android:layout_height="fill_parent"&gt;




&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_weight="1" 
                 android:layout_gravity="top" 
                 android:id="@+id/linearLayout12"
    android:layout_width="fill_parent" 
                 android:layout_height="fill_parent"&gt;


 &lt;Button android:id="@+id/button1"            
               android:layout_width="wrap_content"                                          

               android:layout_height="wrap_content"           
                android:text="Hello, I am a Button" /&gt;



      &lt;/LinearLayout&gt;



&lt;LinearLayout android:layout_weight="1"
    android:layout_gravity="bottom" android:id="@+id/linearLayout1"
    android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;


           &lt;TextView 
            android:id="@+id/text2"              
            android:layout_width="wrap_content"             
            android:layout_height="wrap_content"              
            android:text="Hello, I am a TextView" /&gt;

       &lt;/LinearLayout&gt;

      &lt;/LinearLayout&gt;
</code></pre>
