Remove space between LinearLayout and their children

0

My code is as follows:

     <LinearLayout
        android:background="#ea1a1a"
        android:weightSum="3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <Button

            android:textAllCaps="false"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Boton 1"
            android:layout_weight="1"
            android:theme="@style/BotonColores"
            android:textColor="#ffffff"/>
        <Button
            android:textAllCaps="false"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Boton 2"
            android:layout_weight="1"
            android:theme="@style/BotonColores"
            android:textColor="#ffffff"/>
        <Button
            android:textAllCaps="false"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Boton 3"
            android:layout_weight="1"
            android:theme="@style/BotonColores"
            android:textColor="#ffffff"/>
    </LinearLayout>

This is the result you get:

.

What I need is to remove the space above and below between the LinearLayout and the Buttons, a simple way to do it?

    
asked by Luis Yul 26.06.2017 в 23:36
source

1 answer

2

You can modify the margin of the buttons:

...

android:layout-marginTop="-5sp"
android:layout-marginBottom="-5sp"

...

You can also change the background and put a shadow of your own.

    
answered by 26.06.2017 / 23:45
source