I need your advice to best implement a scrollable playing field in a simple game. The field consists of several rows, 9 cells in each row. Lines can be dynamically added and deleted during the game. Each cell has a number in it and, possibly, several superimposed images, for example, select, selector, cross out, etc. (See Fig. Below). The user should be able to click on individual cells in the row to select / deselect / cross the affected cells. At any moment of the game, there can be from 0 to 3000 cells (from 0 to 333 lines). The field should scroll up and down smoothly.

I was thinking about having a ListView, each row of which is a row in a field. That way, I could add / remove lines dynamically during the game. However, how exactly should I implement the row: to have one bitmap representing the row, and then, when the user touches it, get the coordinates of the touch area and find out which cell was affected, and then act on this. Is it possible to get the contact coordinates of a string in a ListView? If not, should 9 fictitious image measurements be placed on each line, and then act on the user regarding these? How about performance?
Or should I have one huge bitmap / canvas representing the entire field, place it inside the ScrollView, and then calculate all the coordinates and update it when the user interacts with it? Will it be faster or slower than ListView?
Any other solutions?
I prefer it to be a βregularβ game like an application, rather than a loop game, as I don't think I really need to redraw 30 times per second.
I am new to Android. Thank you for your suggestions.
android
Levon
source share