Not displaying Crime properly through Recycle View

Hi all,

I’m going through Ch 9. Everything I followed is to the letter. Everything compiles. But My RecycleView is kinda stretched. Like, I see only one crime on the screen. Once I scroll through the entire length of the screen, second Crime appears and so fort…How do I fix this?

I’m using book edition from 2015.

What is the layout_height of each individual list_item_crime layout? It is likely set to match_parent which makes it the size of the RecyclerView which is the size of the entire screen. Instead, set it to be wrap_content so that the ViewHolder is only as big as it needs to be and then there is no white space in between titles.

Actually that was the issue. I figured that one latter. I posted on SO, and 5 mins after I got answer myself and from other ppl on SO.

But thank you jpaone for replaying on my post