title: Recycler View with multiple rows and columns - AutoFit like Flow Layout [Android]
body: <p>I'm in a challenge to build a layout like this:</p>
  
  <p><a href="https://i.stack.imgur.com/fjMwI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fjMwI.png" alt="enter image description here"></a></p>
  
  <p>My first insight was to use a RecyclerView with an adapter that can deal with each item and inflate its layout.</p>
  
  <p>So far, not so good.</p>
  
  <p>I got this layout so far:</p>
  
  <p><a href="https://i.stack.imgur.com/3vA35.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3vA35.png" alt="enter image description here"></a></p>
  
  <p>I can felling that I'm almost there, but really... I spend a week think about how to make it better, or just like the UI propose.</p>
  
  <p>Some of my tries were</p>
  
  <ol>
  <li>Use a grid layout and change max columns number depending on how many items there are on the list</li>
  <li>StaggeredGridLayoutManager sounded like a powerful candidate to fix it and make me happy, but unfortunately when I tried to use it I realize that we need to pass a number of spanCount (columns) on constructor and I found some ways to work around this limitation changing the number of columns of each row, but I didn't like the final result, was not like I saw in other apps like Foursquare when you setup your interests.</li>
  <li>I checked out this library <a href="https://github.com/ApmeM/android-flowlayout" rel="noreferrer">Flow Layout</a>, but I not even started to use it, because I don't want to lose the whole recycler view power and I believe that there is a way to make it works! .....Even knowing that the library do exactly what I need.</li>
  </ol>
  
  <p>Guys, I'm not here looking for some already done peace of code or someone to do my job. Actually I am looking for the light at the end of the tunnel.</p>