create a grid of dots
I would like to create a grid of dots very much like in this game:
https://play.google.com/store/apps/details?id=com.nerdyoctopus.gamedots&hl=en
The aim is for each dot to be touchable, so I can recognise where that
particular dot is and other information about it.
I don't really know where to start. Do I want to create a custom View for
a dot with all the information I want, and then create multiple versions
of it? And then do I arrange them in a grid with the setTranslation()
method, or would it be better to use LayoutParams with offsets?
If I created my own "Dot" that extended "View", then I could add a lot of
different information/methods to it - I could theoretically have a
changeColor() method. Is this the best way?
A GridView is not what I am thinking of (as far as I know) as it is
basically a different style of ListView.
There are lots of questions here! I have looked at a number of questions
here on StackOverflow and elsewhere, but none show/ explain how I should
start.
No comments:
Post a Comment