How to create a custom grid

I have a problem and I will be grateful if anounoun helps me.

Ok I started programming on Android 2 months ago. Now I am developing a simple game, the battle of the Navoi. For this program, I need to build a grid where I can place ships and coordinates. It seems I can’t understand how I should do this? I think I should create a custom view that will do everything I need. If anyone can set an example or explain how to create an appropriate view, I will be happy

+3
source share
1 answer

IMO, you should consider expanding, or at least using GridViewand placing interface components in it. An adapter that supports Gridview may contain information about coordinates and images (ships).

I think the following would be useful for you:
GridViews Primer on
Creating Custom Components
This is an example of a board game developed on Android: Chess on Android

+4
source

Source: https://habr.com/ru/post/1728427/


All Articles