Remove spaces between bottom layout and scrollview in android
<p><img src="http://i.stack.imgur.com/MgHZh.jpg" alt="enter image description here"></p>

<p>Below is the xml code .... </p>

<p>Friends Help me how to avoid space between scrollview and bottomLayout </p>

<p>Xml file:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/addNewEventsCommonbg" &gt;

    &lt;TextView
        android:id="@+id/addNewEventsTitle"
        android:layout_width="match_parent"
        android:layout_height="35dp"
        android:layout_alignParentTop="true"
        android:background="@drawable/dialog_title_bg"
        android:gravity="center_vertical"
        android:paddingLeft="20dp"
        android:text="@string/AddNewEvents"
        android:textColor="@color/whiteColor"
        android:textSize="16sp"
        android:textStyle="normal" /&gt;

    &lt;TextView
        android:id="@+id/addNewEventsTitleName"
        android:layout_width="match_parent"
        android:layout_height="35dp"
        android:layout_below="@+id/addNewEventsTitle"
        android:background="@color/addNewEventsTitleNamebg"
        android:drawableLeft="@drawable/mail_sent_icon"
        android:drawablePadding="10dp"
        android:gravity="center_vertical"
        android:paddingLeft="20dp"
        android:text="@string/AddNewEvent"
        android:textColor="@color/whiteColor"
        android:textSize="16sp"
        android:textStyle="normal" /&gt;

    &lt;ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/bottomLayout"
        android:layout_below="@+id/addNewEventsTitleName" &gt;

        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" &gt;

            &lt;LinearLayout
                android:id="@+id/addNewEventsEventLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/AddNewEventsTopMargin"
                android:orientation="horizontal" &gt;

                &lt;TextView
                    android:layout_width="100dp"
                    android:layout_height="wrap_content"
                    android:gravity="left|center_vertical"
                    android:paddingLeft="20dp"
                    android:text="@string/AddNewEvent"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;

                &lt;EditText
                    android:id="@+id/addNewEventsName"
                    style="@style/edittext_style"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/AddNewEventsHeight"
                    android:layout_marginRight="10dp"
                    android:gravity="center_vertical|left"
                    android:inputType="text|textCapSentences"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:id="@+id/addNewEventsDateTimeLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/AddNewEventsTopMargin"
                android:orientation="horizontal" &gt;

                &lt;LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="horizontal" &gt;

                    &lt;TextView
                        android:layout_width="100dp"
                        android:layout_height="match_parent"
                        android:gravity="left|center_vertical"
                        android:paddingLeft="20dp"
                        android:text="@string/addNewEventsDate"
                        android:textColor="@color/addNewEventsTextColor"
                        android:textSize="16sp" /&gt;

                    &lt;TextView
                        android:id="@+id/addNewEventsDate"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/AddNewEventsHeight"
                        android:layout_marginLeft="5dp"
                        android:background="@drawable/wedding_date_bg"
                        android:gravity="center"
                        android:text="@string/setDate"
                        android:textColor="@color/whiteColor"
                        android:textSize="16sp" /&gt;
                &lt;/LinearLayout&gt;

                &lt;LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="10dp"
                    android:layout_weight="1"
                    android:orientation="horizontal" &gt;

                    &lt;TextView
                        android:layout_width="100dp"
                        android:layout_height="match_parent"
                        android:gravity="right|center_vertical"
                        android:paddingRight="20dp"
                        android:text="@string/AddNewEventsTime"
                        android:textColor="@color/addNewEventsTextColor"
                        android:textSize="16sp" /&gt;

                    &lt;TextView
                        android:id="@+id/addNewEventsTime"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/AddNewEventsHeight"
                        android:layout_marginLeft="5dp"
                        android:background="@drawable/wedding_date_bg"
                        android:gravity="center"
                        android:text="@string/setTime"
                        android:textColor="@color/whiteColor"
                        android:textSize="16sp" /&gt;
                &lt;/LinearLayout&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:id="@+id/addNewEventsAddressLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/AddNewEventsTopMargin"
                android:orientation="horizontal" &gt;

                &lt;TextView
                    android:layout_width="100dp"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:paddingLeft="20dp"
                    android:text="@string/address"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;

                &lt;EditText
                    android:id="@+id/addNewEventsAddress"
                    style="@style/edittext_style"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/AddNewEventsAddressHeight"
                    android:layout_marginRight="10dp"
                    android:gravity="center_vertical|left"
                    android:inputType="textPostalAddress"
                    android:paddingBottom="5dp"
                    android:paddingLeft="5dp"
                    android:paddingRight="5dp"
                    android:paddingTop="5dp"
                    android:singleLine="false"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:id="@+id/addNewEventsContactLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/AddNewEventsTopMargin"
                android:orientation="horizontal" &gt;

                &lt;TextView
                    android:layout_width="100dp"
                    android:layout_height="match_parent"
                    android:gravity="left|center_vertical"
                    android:paddingLeft="20dp"
                    android:text="@string/AddNewEventContact"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;

                &lt;EditText
                    android:id="@+id/addNewEventsContacts"
                    style="@style/edittext_style"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/AddNewEventsHeight"
                    android:layout_marginRight="10dp"
                    android:gravity="center_vertical|left"
                    android:inputType="text|textCapSentences"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:id="@+id/addNewEventsPhoneFaxLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/AddNewEventsTopMargin"
                android:baselineAligned="false"
                android:orientation="horizontal" &gt;

                &lt;LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="horizontal" &gt;

                    &lt;TextView
                        android:layout_width="100dp"
                        android:layout_height="match_parent"
                        android:gravity="left|center_vertical"
                        android:paddingLeft="20dp"
                        android:text="@string/AddNewEventsPhone"
                        android:textColor="@color/addNewEventsTextColor"
                        android:textSize="16sp" /&gt;

                    &lt;EditText
                        android:id="@+id/addNewEventsPhone"
                        style="@style/edittext_style"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/AddNewEventsHeight"
                        android:inputType="phone"
                        android:textColor="@color/addNewEventsTextColor"
                        android:textSize="16sp" /&gt;
                &lt;/LinearLayout&gt;

                &lt;LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="10dp"
                    android:layout_weight="1"
                    android:orientation="horizontal" &gt;

                    &lt;TextView
                        android:layout_width="100dp"
                        android:layout_height="match_parent"
                        android:gravity="right|center_vertical"
                        android:paddingRight="20dp"
                        android:text="@string/AddNewEventsFax"
                        android:textColor="@color/addNewEventsTextColor"
                        android:textSize="16sp" /&gt;

                    &lt;EditText
                        android:id="@+id/addNewEventsFax"
                        style="@style/edittext_style"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/AddNewEventsHeight"
                        android:inputType="text|phone"
                        android:textColor="@color/addNewEventsTextColor"
                        android:textSize="16sp" /&gt;
                &lt;/LinearLayout&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:id="@+id/addNewEventsEmailLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/AddNewEventsTopMargin"
                android:orientation="horizontal" &gt;

                &lt;TextView
                    android:layout_width="100dp"
                    android:layout_height="match_parent"
                    android:gravity="left|center_vertical"
                    android:paddingLeft="20dp"
                    android:text="@string/email"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;

                &lt;EditText
                    android:id="@+id/addNewEventsEmail"
                    style="@style/edittext_style"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/AddNewEventsHeight"
                    android:layout_marginRight="10dp"
                    android:gravity="center_vertical|left"
                    android:inputType="textWebEmailAddress"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:id="@+id/addNewEventsWebsiteLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/AddNewEventsTopMargin"
                android:orientation="horizontal" &gt;

                &lt;TextView
                    android:layout_width="100dp"
                    android:layout_height="match_parent"
                    android:gravity="left|center_vertical"
                    android:paddingLeft="20dp"
                    android:text="@string/AddNewEventsWebsite"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;

                &lt;EditText
                    android:id="@+id/addNewEventsWebsite"
                    style="@style/edittext_style"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/AddNewEventsHeight"
                    android:layout_marginRight="10dp"
                    android:gravity="center_vertical|left"
                    android:inputType="textWebEditText"
                    android:textColor="@color/addNewEventsTextColor"
                    android:textSize="16sp" /&gt;
            &lt;/LinearLayout&gt;

            &lt;EditText
                android:id="@+id/AddNewEventsComments"
                style="@style/edittext_style"
                android:layout_width="match_parent"
                android:layout_height="@dimen/AddNewEventsCommentsHeight"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="@dimen/AddNewEventsTopMargin"
                android:gravity="left"
                android:inputType="textMultiLine"
                android:paddingBottom="5dp"
                android:paddingLeft="5dp"
                android:paddingRight="5dp"
                android:paddingTop="5dp"
                android:singleLine="false"
                android:textColor="@color/addNewEventsTextColor"
                android:textSize="16sp" /&gt;
        &lt;/LinearLayout&gt;
    &lt;/ScrollView&gt;

    &lt;LinearLayout
        android:id="@+id/bottomLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal" &gt;

        &lt;Button
            android:id="@+id/addNewEventsCancelBtn"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="3dp"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="2dp"
            android:layout_weight="1"
            android:background="@drawable/cancel_btn_selector"
            android:text="@string/cancel"
            android:textColor="@color/whiteColor"
            android:textSize="18sp" /&gt;

        &lt;Button
            android:id="@+id/addNewEventsSaveBtn"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="3dp"
            android:layout_marginLeft="2dp"
            android:layout_marginRight="5dp"
            android:layout_weight="1"
            android:background="@drawable/save_btn_selector"
            android:text="@string/save"
            android:textColor="@color/whiteColor"
            android:textSize="18sp" /&gt;
    &lt;/LinearLayout&gt;

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