Im trying to draw a game map in an android app similar to the game board of monopoly where all the squares are all on the edges.
At first I wanted to use GridView because its basically gonna be a series of boxes containing images that can be clicked. However, I found out that gridview does not support spanning. I need the center part of the game board to be “merged”.
Now, i’m trying to use tablelayout. The board has a fixed number of columns and rows. With table layout, I have to specify the width and height of the objects. But specifying a fixed width and height might not work in all different screen sizes.
What can you suggest as the best approach in drawing a board similar to monopoly.
I need onclick listeners on each square on the board and Im not sure how complicated it is to implement it on a canvas.
So I just settled with using nested LinearLayout. The weight attribute made it easy to give the child views within the layout equal width/height.