Hey.

There is a certain area of ​​slots (squares) as indicated in the figure. Having touched a certain slot with a finger, it is necessary to select a certain word with the movement of a finger.

So the question is actually how most efficiently and with the help of which Layout-s it is better to implement such an area (consisting of so-called slots) and how to calculate where the user leads with a finger (without taking it off the screen) and which slots have already chosen.

Where can I read more about this.

alt text

Thank you.

    1 answer 1

    And you need only one View. First, look at this example of the game Tic-Tac-Toe . All the trick is that we simply track the current coordinates where the user has touched, then we decide - we need to show the menu or highlight it.

    If you look at the truth, the backlight is easy. At the moment of pressing, we calculate the cell and write a new state of the cell to the cell state array and call the drawing. It will call the OnDraw method, in which the correct picture of the world is drawn based on the array of states.

    • Thank. And how to break into cells, if I use only 1 view? and what for example view? There are a lot of them. - Sever
    • An example of watching? need a base view. From him is the heir. And all the cells are drawn independently. This gives a very large scope for fantasy. - KoVadim
    • In general, the idea is clear. I'll dig. Thank you. - Sever