Prevent empty XML element to take room
<p>How can I make so that when an element is empty, it simply does not take any room on the screen? </p>

<p>For example on this XML : </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:descendantFocusability="blocksDescendants"&gt;

    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="55dp"
        android:orientation="horizontal"
        android:layout_marginLeft="60dp"
        android:weightSum="1"&gt;
        &lt;LinearLayout
            android:layout_width="0px"
            android:layout_height="match_parent"
            android:orientation="horizontal"
            android:layout_weight="0.8"
            android:weightSum="1"&gt;
                &lt;Button
                    android:layout_width="10dp"
                    android:layout_height="10dp"
                    android:layout_gravity="center"
                    android:layout_marginRight="20dp"
                    android:background="@drawable/no_urgence"
                    android:id="@+id/urg"/&gt;

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

            &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="10dp"
        android:textSize="17sp"
        android:id="@+id/TitreSav"
        android:textColor="@color/FrozenBlue"
        android:layout_gravity="center_vertical"/&gt;

&lt;TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginRight="10dp"
    android:textSize="12sp"
    android:id="@+id/date"
    android:textColor="@color/FrozenBlue"
    android:layout_gravity="center_vertical"
    /&gt;
        &lt;/LinearLayout&gt;



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

<p></p>

<p>The TextView with id : date will sometimes be empty. When it's the case, I don't want it to take any room in my list (see the screenshot for an easier understanding, can't quite find the words in english)
<a href="https://i.stack.imgur.com/SYD2N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SYD2N.png" alt="enter image description here"></a>
(I want Hyj to be aligned with the small circle but the empty date is still here under)</p>

<p>I've already tried to set the Visibility to Gone or invisible but I still have the remaining blank space when the date is empty.</p>