title: Hexagonal board for Android - how to do it?
body: <p>Once again I started to experiment with Android things. I'm trying to create a small simple game, which uses a hexagonal board. I know the math behind the hexagonal calculations, but the problem is how to actually implement such board in Android?</p>
  
  <p>At first I thought of using a grid view where every other line is displaced by half step and then use these square grids as my board and just draw a hexagonal shape over the square boxes. However, the regular grid view doesn't seem to allow me to do that.</p>
  
  <p><img src="https://i.stack.imgur.com/yfBCV.png" alt="Displaced square grid"></p>
  
  <p>So I thought that maybe I need to create a custom view with either hexagonal grid or a custom view with square displaced grid.</p>
  
  <p>I'm not familiar with Android custom views. I read a tutorial about custom views from <a href="http://www.vogella.com/tutorials/AndroidCustomViews/article.html" rel="nofollow noreferrer">Vogella's tutorials</a> but I'm still very unsure, if it's even possible to create a hexagonal grid as a custom view.</p>
  
  <p>So any ideas and help of how to create and implement a hexagonal game board on android?</p>