View-common / view.core.views.layouts / GridLayout
GridLayout
open class GridLayout :Layout
A layout where child views are positioned in a rectangular grid.
A grid is divided into rows and columns. Views are placed inside a Cell where a cell can occupy more than one row or column.
Types
Cell
class Cell
Represents a container for a child view.
Constructors
<init>
GridLayout()
A layout where child views are positioned in a rectangular grid.
Properties
cells
val cells: <ERROR CLASS>
Contains the cells in a grid.
columnCount
var columnCount:Int
The number of columns in the grid.
horizontalSpace
var horizontalSpace:Double
The space between the grid rows.
rowCount
var rowCount:Int
The numbers of rows in the grid.
verticalSpace
var verticalSpace:Double
The space between the grid columns.
Inherited Properties
childViews
val childViews:MutableCollection<View>
A mutable collection containing the child views.
scrollX
var scrollX:Boolean
Determines if the layout can be scrolled horizontally.
scrollY
var scrollY:Boolean
Determines if the layout can be scrolled vertically.
Functions
addChild
open fun addChild(child:View):Booleanfun addChild(child:View, cell:Cell):Boolean
Adds a view to the layout.
Inherited Functions
children
fun children(): <ERROR CLASS>
Exposes the child views.
find
fun find(id:String):Viewfun find(id:Int):View
Returns the direct or indirect child view having the specified ID.
removeChild
open fun removeChild(child:View):Boolean
Removes a child from the layout.