evnobev
evnobev

Reputation: 131

Should I use a GridView or TableLayout for a Checkers/Draughts Board on Android?

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

Answers (1)

Radu
Radu

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

Related Questions