Reputation: 29
I made a subclass of button called Block for a minesweeper like game. I then made a 2d array of this class. Is there an easy way to display this array in a grid?
Thanks
Upvotes: 2
Views: 733
Reputation: 3000
You should use a GridView
with a custom adapter. There is enough documentation available at
the Android developer website
Here is a tutorial for a custom adapter. The tutorial uses a ListView
, but the adapter will also work with a GridView
Upvotes: 1