Framework around the linear layout

1

In an android application I wrap the contents of a fragment in a linearLayout.

I put everything necessary and with width match_parent but when I execute it, it leaves me as a frame around the screen, which I do not want it to be.

the linear layout takes the following.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/fondo_pantalla"
    android:orientation="vertical"
    tools:context="...">

It also happens with the components that are within this linear layout. if I put it match_parent does not quite reach the edge of this,

paddin does not have values and margin only where I need them.

Any ideas?

    
asked by mabts 04.04.2018 в 14:02
source

1 answer

0

What you show on your image is a CardView with a lift that allows you to display a shadow and a space, to eliminate the elevation define this property with 0dp, card_view:cardElevation="0dp" .

Example:

<android.support.v7.widget.CardView
        xmlns:card_view="http://schemas.android.com/apk/res-auto"

        ...
        ...
        card_view:cardElevation="0dp"
        ...
        ...
        >

If you have defined elevation or a padding then it looks like this:

If you delete the elevation or a defined padding, it would display like this:

    
answered by 05.04.2018 в 00:00