title: How to prepare setSpanSizeLookup in GridLayoutManager
body: <p>i need every 18,36,54,...18*Nth... grid with layout with width:match parent and height:60dp in grid layout manager for pagination loadingbar purpose.</p>
  <p>Here is my code,</p>
  <pre><code> GridLayoutManager mng_layout = new GridLayoutManager(this, 4);//WHAT IS 4 ?//
              mng_layout.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
                  @Override
                  public int getSpanSize(int position) {
                      int mod = position % 6;   //WHAT IS 6 ?//
      
                      if (position == 0 || position == 1)
                          return 2;    //WHAT IS 2 ?//
                      else if (position &lt; 6)
                          return 1;   //WHAT IS 1 ?//
                      else if (mod == 0 || mod == 1)
                          return 2;   //WHAT IS 2 ?//
                      else
                          return 1;   //WHAT IS 1 ?//
                  }
              }); 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/xfx1w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xfx1w.png" alt="i need this type of layout" /></a></p>
  <p>if anybody have a time please explain commented line in code</p>