'What kind of Android Java elements to use for 2dmap representation?

I am trying to create a 2d map of square boxes of x by x size as shown below.

I should be able to "put" elements on top of it. For example, the cell/square can be selected and highlighted, and I can put an image on top of it.

It should also be able to show a character movement overlay such as:

enter image description here

https://camo.githubusercontent.com/5945e98d700638cbe30e7de5b38da2a5747a8bdf4659c7ebb26d31fd0f92f872/68747470733a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d766965772669643d316d347837684446746a4a4346665332356579643272503671784e594b6e526e6c

Currently I am creating it by defining my own Cell class:

private class Cell {
        boolean topWall = true,
                leftWall = true,
                bottomWall = true,
                rightWall = true;


        int col, row;

        public Cell(int col, int row) {
            this.col = col;
            this.row = row;
        }


    }

and using canvas to draw the square. I am wondering if there are better ways to achieve this



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source