title: Getting confused using weightSum
body: <p>First of all this is a layout of a fragment that contains a TextView ,View and a ListView.The View which is a gray line do not appear.</p>
  
  <p><em>I want to get in the top the TextView and below it the gray line then the ListView.</em></p>
  
  <p>I knew that the layout_weight &lt; weigthSum but when using it like that I get the ListView too much in the bottom so I tried it = 165 and got a better result but still not getting the gray line</p>
  
  <p>This is the xml for the layout where I have set the weightSum=100 and the layout_weight of the relative layout that contains the textView and the ImageView =165 .</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="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:weightSum="100"&gt;
      &lt;!--android:weightSum="100"--&gt;
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_weight="165"
          android:id="@+id/first_relative_accueil_fragment"&gt;
          &lt;!--165--&gt;
          &lt;!--android:layout_weight="160"--&gt;
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:id="@+id/accueil_toolbar_text"
              android:text="Accueil"
              android:textSize="20dp"
              android:paddingLeft="16dp"
              android:paddingTop="16dp"/&gt;
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="2dp"
              android:background="@android:color/darker_gray" /&gt;
  
      &lt;/RelativeLayout&gt;
      &lt;ListView
          android:id="@+id/accueil_fragment_list"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/IDiHL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IDiHL.png" alt="This is what I get in my phone after running the app"></a></p>