title: set max rows 4 and columns to be dynamic in RecyclerView GridLayoutManager
body: <p>I want a grid view which adds elements in new row each time when the row count reach 4 it should start adding element in 1st row.</p>
  
  <p>Let say I have 7 items in 1st image and add 2 more elements then it should add first element at last index of 2nd column and second element at 1 index of column 3</p>
  
  <p>Let say I have 11 items in 2nd image and add 2 more elements then it should add first element at last index of 3rd column and second element at 1 index of column 4</p>
  
  <p><a href="https://i.stack.imgur.com/bpezu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bpezu.png" alt="enter image description here"></a> </p>
  
  <p><a href="https://i.stack.imgur.com/6LqWa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6LqWa.png" alt="enter image description here"></a></p>