title: How in RecyclerView with custom first element make first element height equals to size of the screeen
body: <p>Container:</p>
  <pre><code>    &lt;androidx.constraintlayout.widget.ConstraintLayout
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;&gt;
  
          &lt;androidx.recyclerview.widget.RecyclerView
              android:id=&quot;@+id/photos_grid&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;match_parent&quot;
              android:padding=&quot;16dp&quot;
              app:layoutManager=&quot;androidx.recyclerview.widget.StaggeredGridLayoutManager&quot;
              app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
              app:layout_constraintHorizontal_bias=&quot;0.0&quot;
              app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
              app:layout_constraintRight_toRightOf=&quot;parent&quot;
              app:layout_constraintTop_toTopOf=&quot;parent&quot;
              app:layout_constraintVertical_bias=&quot;0.0&quot;
              app:listData=&quot;@{viewModel.photos}&quot;
              tools:itemCount=&quot;100&quot;
              tools:listitem=&quot;@layout/list_view_item&quot; /&gt;
  
      &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  <p>Title (TextView just for example. It with the button must fill all the screen):</p>
  <pre><code>    &lt;LinearLayout
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:gravity=&quot;center&quot;
          android:orientation=&quot;vertical&quot;
          android:weightSum=&quot;1&quot;&gt;
  
          &lt;TextView
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;0dp&quot;
              android:layout_weight=&quot;1&quot;
              android:text=&quot;text&quot; /&gt;
          &lt;Button
              android:id=&quot;@+id/button&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_gravity=&quot;center&quot;
              android:layout_marginHorizontal=&quot;8dp&quot;
              android:layout_marginBottom=&quot;32dp&quot;
              android:text=&quot;@string/button_text&quot; /&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  <p>In layout editor it looks like this:
  <a href="https://i.stack.imgur.com/bH7y7.png" rel="nofollow noreferrer">layout editor screenshot</a>
  But in application it height is shrinked to content:
  <a href="https://i.stack.imgur.com/aeM6O.png" rel="nofollow noreferrer">application screenshot</a></p>
  <p>Repository with test project is here: <a href="https://github.com/Andrey-Metelyov/Just_Image_Gallery" rel="nofollow noreferrer">https://github.com/Andrey-Metelyov/Just_Image_Gallery</a></p>