title: How to assign grid span in airbnb Epoxy?
body: <p>I've been starting learning how to use Epoxy in my project. I'm learning this library by running <a href="https://github.com/airbnb/epoxy/tree/master/epoxy-sample" rel="nofollow noreferrer">sample project</a>. Everything was fine until I dig into the grid span settings. I found myself confused about its grid system.</p>
  
  <p><a href="https://i.stack.imgur.com/7jXT2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7jXT2.jpg" alt="enter image description here"></a></p>
  
  <p>As you can see in sample app the ViewHolders can be divided in 3 parts. Those parts can be represented particularly in models, such as <code>HeaderViewModel_</code>, <code>ButtonBindingModel_</code> and <code>CarouselModelGroup</code>.</p>
  
  <p>And the code of init RecyclerView is the following:</p>
  
  <pre><code>EpoxyRecyclerView recyclerView = (EpoxyRecyclerView) findViewById(R.id.recycler_view);
  recyclerView.setLayoutManager(new GridLayoutManager(this, 2));
  </code></pre>
  
  <p>According to offical doc:</p>
  
  <blockquote>
    <p>If a GridLayoutManager is used this will automatically sync the span
    count with the EpoxyController.</p>
  </blockquote>
  
  <p>I found <code>HeaderViewModel_</code> and <code>CarouselModelGroup</code> is correctly sync the span, but <code>ButtonBindingModel_</code> is not. I've been searching the word "span" or "grid" over the sample codes, <strong>I just couldn't figure out why <code>ButtonBindingModel_</code> could have its span to be set as 1.</strong></p>
  
  <p>If I change the span setting of RecyclerView from 2 to 3:</p>
  
  <pre><code>EpoxyRecyclerView recyclerView = (EpoxyRecyclerView) findViewById(R.id.recycler_view);
  recyclerView.setLayoutManager(new GridLayoutManager(this, 3));
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tVp5H.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tVp5H.jpg" alt="enter image description here"></a></p>
  
  <p><code>HeaderViewModel_</code> and <code>CarouselModelGroup</code> still remained to sync the full span, but the span of <code>ButtonBindingModel_</code> is still 1.</p>
  
  <p>I would like to know if there is an approach to make the span of <code>ButtonBindingModel_</code> to full span, and method to set <code>HeaderViewModel_</code> and <code>CarouselModelGroup</code> to specific span no matter by code (programmatically) or by layout. Please help me to figure out this problem, I appreciate it.</p>