Reputation: 131
I'm pretty new to android, and I want to make a checkers game. Should I use a gridview, tablelayout, or something else to construct an 8x8 board on which you can place and move pieces. Please explain your answer: what are the specific benefits to whatever you think is best to create this board.
Thanks, Evan
PS Any other suggestions for this app are also appreciated.
Upvotes: 0
Views: 319
Reputation: 384
Between the GridView
and the TableLayout
, I'd go with the GridView
.
You will see the benefits when you try to get the users' move.
In a TableLayout
you would have to write a switch{} for each of the 64 squares.
In a GridView
you can set an onItemClickListener
to get the users' move, regardless of the position.
Upvotes: 1