I’m learning android development and I’m doing a minesweeper. So I use a tableLayout to display the board. But how can I do to adapt the width of the cells to fit the screen ?
Currently my cells are fixed so the grid expand beyond the side of the screen…
How can I take the entire screen width for my tableLayout ?
Thanks.
since you are creating your cells dynamically,
you can calculate the height and width of the screen using:
and then set your cell size accordingly.