Android layout system is so hard to master. We don't want to go too deep into it. That's why we simply set screen orientation to portrait only so we won't be distracted by those tricky layout details.
To give RESET button some room on screen, View.onMeasure(..) method is overridden to limit ChessView within a square. It occupied a rectangle unnecessarily before.
GitHub repo:
https://github.com/zhijunsheng/chess-...