It seems that simply using android:layout_height="wrap_content" on your RecyclerView won’t make its height automatically expand when new items are added in it.
I also tried using recyclerView.setHasFixedSize(false) in my Kotlin fragment file, but that didn’t help at all. (But try it, maybe our issues are different. The parent of my RecyclerView is a ConstraintLayout.)
What helped was wrapping my RecyclerView (whose height is match_parent) inside a RelativeLayout (whose height is wrap_content)
The homo sapiens behind these blog posts is “Catzie“
An odd human being who happens to have a variety of ever-changing interests, but these days she is often caught coding (Web and Android App Developer for a total of 14+ years!), optimizing this blog, tweaking a Traveler’s Notebook, refilling a cheap fountain pen, making up silly song/rap lyrics, watching K-pop performances, concocting unusual dessert/drink flavors, making scented candles, drawing, painting water-based mixed media pieces, obsessing about how some things works and what unfamiliar words mean, automating repetitive chores, anime, video games… Ran online dessert shops Cookies PH and Catzie’s Cakery in her past life.