How to manage Layout In android
<p>I had just started working on android..actually i had created an calculator application..
the problem i have faced is to manage the layout..i mean to say that..i have four buttons in a row..now in next row i have another four buttons but when i run the application the space between first row and second row is quiet large..so can anyone tell me how can i decreases the space between these two row..</p>

<p>The code i have written is</p>

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

<p></p>

<pre><code>&lt;LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"&gt;


&lt;TextView
    android:id="@+id/label"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Calculator Application"/&gt;

&lt;EditText
    android:id="@+id/entry"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@android:drawable/editbox_background"
    android:layout_below="@id/label"/&gt;

    &lt;LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1"&gt;
            &lt;LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_weight="1"&gt;
                &lt;Button
                    android:id="@+id/one"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:layout_alignParentRight="true"
                    android:layout_marginLeft="10dip"
                    android:text="1" /&gt;
                &lt;Button
                    android:id="@+id/two"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:layout_alignParentRight="true"
                    android:layout_marginLeft="10dip"
                    android:text="2" /&gt;
                &lt;Button
                    android:id="@+id/three"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:layout_alignParentRight="true"
                    android:layout_marginLeft="10dip"
                    android:text="3" /&gt;
                &lt;Button
                    android:id="@+id/plus"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:layout_alignParentRight="true"
                    android:layout_marginLeft="10dip"
                    android:text="+" /&gt;

            &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1"&gt;
            &lt;LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_weight="1"&gt;
            &lt;Button
            android:id="@+id/four"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="4" /&gt;
            &lt;Button
            android:id="@+id/five"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="5" /&gt;
            &lt;Button
            android:id="@+id/six"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="6" /&gt;
            &lt;Button
            android:id="@+id/minus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="-" /&gt;
            &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1"&gt;
            &lt;LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_weight="1"&gt;
            &lt;Button
            android:id="@+id/seven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="7" /&gt;
            &lt;Button
            android:id="@+id/eight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="8" /&gt;
            &lt;Button
            android:id="@+id/nine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="9" /&gt;
            &lt;Button
            android:id="@+id/multiply"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="*" /&gt;
            &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1"&gt;
            &lt;LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_weight="1"&gt;
            &lt;Button
            android:id="@+id/zero"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="0" /&gt;
            &lt;Button
            android:id="@+id/clr"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="c" /&gt;
            &lt;Button
            android:id="@+id/equal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="=" /&gt;
            &lt;Button
            android:id="@+id/divide"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_alignParentRight="true"
            android:layout_marginLeft="10dip"
            android:text="/" /&gt;
            &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;
</code></pre>

<p></p>

<p></p>

<p>regards
Anshuman</p>
