title: Android custom container (hexagonal) withe adapter
body: <p>I want to create a custom android container. Where I can easily add and remove objects. The container should place objects inside hexagons. The order in which objects places is really important and shown in the image below. Objects in this adapter are click-able ImageViews (circular). 
  It is even possible to make something like this for Android?  </p>
  
  <p><img src="https://i.stack.imgur.com/lhJDP.jpg" alt="Hexagon-Circle"></p>
  
  <p>I know that there were similar questions like mine, but there are not even close to what I want to achieve.</p>
  
  <p>Probably more and more people where looking for more custom containers like that one I'm trying to make. Not the standard one like in other apps: GridsView, ListView, etc. </p>
  
  <p><strong>What I've already made</strong></p>
  
  <p>I decided to use <em>RecyclerView</em> and custom <em>RecyclerView.LayoutManagers</em>. Also write an algorithm to define a position of ImageViews. Unfortunately I'am not familiar with LayoutManager and not sure how should I define places using it Interface.</p>
  
  <p><a href="https://guides.codepath.com/android/using-the-recyclerview#layoutmanagers" rel="nofollow noreferrer">RecyclerView</a></p>
  
  <p>Here is algorithm:</p>
  
  <pre><code>List&lt;Object&gt; list; 
  int nuberOfElements = list.size();
  int layerNr = 0;
  int radius = 0;
  int angle = 0;
  
  //handle first middel element postion(0,0)
  nuberOfPlaceElements --;
  radius += r;
  
  for(layerNr=1; nuberOfElements &gt; 0; layerNr ++){
      for(int elementInLayer = 0; elementInLayer &lt; layerNr * 6; elemnetInLayer ++){ 
          //layerNr *6 -&gt; define how many elements in layer
  
          angle += 360/layerNr * 6
          //handle the postion of elemnts in Layer
  
          nuberOfElements--;
      }
      radius += r;
      angle = 0;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/998OX.jpg" alt="Hexagon-Order"></p>