I'm trying to set the height of the first view on my recyclerview to match_parent. That is, the first view should cover the entire device. Here's the XML for this first view, note height and width set to match_parent
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:contentPadding="14dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/main_icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="IC"
android:textSize="100sp" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/temp"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:gravity="center"
android:text="12°"
android:textColor="@color/normal_text"
android:textSize="86dp"
android:textStyle="bold" />
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="LIGHT SNOW"
android:textColor="@color/light_text"
android:textSize="14dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="20dp">
<com.feresr.rxweather.UI.views.InfoDisplay
android:id="@+id/humidity"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:ic=""
app:sub="Humid." />
<com.feresr.rxweather.UI.views.InfoDisplay
android:id="@+id/tempMax"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:ic=""
app:sub="East" />
<com.feresr.rxweather.UI.views.InfoDisplay
android:id="@+id/tempMin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:ic=""
app:sub="Press." />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="20dp">
<com.feresr.rxweather.UI.views.InfoDisplay
android:id="@+id/clouds"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:ic=""
app:sub="Cluds" />
<com.feresr.rxweather.UI.views.InfoDisplay
android:id="@+id/precipitation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:ic=""
app:sub="0.29 mm" />
<com.feresr.rxweather.UI.views.InfoDisplay
android:id="@+id/feels_like"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:ic=""
app:sub="Feels like " />
</LinearLayout>
</LinearLayout>
For some reason, when running this on my device I see the view as wrap content instead. Any kind help will be appreciated.