CellStateView

class CellStateView(context: Context, attrs: AttributeSet) : View

A dummy View that allows Grid.State properties to be set through child elements of a HexGridView in layout XML, without adding an actual View instance at runtime.

<com.gonodono.hexgrid.view.HexGridView …>

<com.gonodono.hexgrid.view.CellStateView

app:layout_cellRowAndColumn="1,1"
app:layout_cellIsSelected="true" />

</com.gonodono.hexgrid.view.HexGridView>

The XML attributes are used for the initial property values, and the CellStateView object itself is discarded.

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet)