RecyclerView 23.2.0 and item height

The last week was published the last support libraries v23.2.0.
Pay attention to the news about the RecyclerView

This release brings an exciting new feature to the LayoutManager API: auto-measurement! This allows a RecyclerView to size itself based on the size of its contents. This means that previously unavailable scenarios, such as using WRAP_CONTENT for a dimension of the RecyclerView, are now possible. You’ll find all built in LayoutManagers now support auto-measurement.
Due to this change, make sure to double check the layout parameters of your item views: previously ignored layout parameters (such as MATCH_PARENT in the scroll direction) will now be fully respected.

What does it mean?
A little example to explain.

Just use a simple RecyclerView with a simple item for each item:

item_layout.xml:
<RelativeLayout  
xmlns:android=”http://schemas.android.com/apk/res/android"
android:layout_width=”match_parent”
android:layout_height=”match_parent” >
        <ImageView/>
<TextView/>
<TextView/>
</RelativeLayout>

BEFORE (V.23.1.1):

build.gradle

dependencies {
//...
compile ‘com.android.support:recyclerview-v7:23.1.1
}
A classic RecyclerView with 23.1.1

AFTER v23.2.0:

build.gradle

dependencies {
//...
compile ‘com.android.support:recyclerview-v7:23.2.0
}
the same RecyclerView with 23.2.0

As you can see the same item now fills all the space available.

Just change the layout parameters of your item views.

item_layout.xml

<RelativeLayout  
xmlns:android=”http://schemas.android.com/apk/res/android"
android:layout_width=”match_parent”
android:layout_height=”wrap_content” >
<ImageView/>
<TextView/>
<TextView/>
</RelativeLayout>

Our RecyclerView is back again:

The same question on StackOverflow.