1

A normal GridView in Android works like the below example:

enter image description here

What I need is a slightly different numbering style. That is starting from buttom to up and on each row the numbers would be reversed:

enter image description here

I want to use this as a base of a simple snake and ladder game something like:

enter image description here

So my question is, how can I change this mapping? Should I consider making a subclass of GridView or should I do this effect in my CellAdapter.

What I do now, is having a class that giving the number in a normal GridView will return the number in MyGridView. A Hardcoded method that if for example you give number 6 to it, it will return 7.

I want to make more levels for the game and more rows and columns will be necessary, so using a hardcoded translator is stupid! but I couldn't figure out a generic soloution for this case.

Dumbo
  • 13,555
  • 54
  • 184
  • 288

0 Answers0