I'm trying to achieve this using a GridLayoutManager, It's possible to set the span size using a lookup, but I can't find a way to set the span to something like wrap_content.
This other question solve the problem if you know before hand the size but not when it's dynamic like on this image.