class GridEngine


GridEngine class contains the main logic of the Grid Helper

Summary

Constants

const Int
const Int

Public constructors

GridEngine(rows: Int, columns: Int)
GridEngine(rows: Int, columns: Int, numWidgets: Int)

Public functions

Int

Get the boxView for the widget i to add a constraint on the bottom

Int

Get the boxView for the widget i to add a constraint on the left

Int

Get the boxView for the widget i to add a constraint on the right

Unit
setColumns(columns: Int)

set new columns value

Unit

Set new NumWidgets value

Unit
setOrientation(orientation: Int)

set new orientation value

Unit
setRows(rows: Int)

set new rows value

Unit
setSkips(skips: String!)

set new skips value

Unit

set new spans value

Unit

Set up the Grid engine.

Int

Get the boxView for the widget i to add a constraint on the top

Constants

HORIZONTAL

Added in 1.1.0-alpha13
const val HORIZONTAL = 0: Int

VERTICAL

Added in 1.1.0-alpha13
const val VERTICAL = 1: Int

Public constructors

GridEngine

Added in 1.1.0-alpha13
GridEngine()

GridEngine

Added in 1.1.0-alpha13
GridEngine(rows: Int, columns: Int)

GridEngine

Added in 1.1.0-alpha13
GridEngine(rows: Int, columns: Int, numWidgets: Int)

Public functions

bottomOfWidget

Added in 1.1.0-alpha13
fun bottomOfWidget(i: Int): Int

Get the boxView for the widget i to add a constraint on the bottom

Parameters
i: Int

the widget that has the order as i in the constraint_reference_ids

Returns
Int

the boxView to add a constraint on the bottom

leftOfWidget

Added in 1.1.0-alpha13
fun leftOfWidget(i: Int): Int

Get the boxView for the widget i to add a constraint on the left

Parameters
i: Int

the widget that has the order as i in the constraint_reference_ids

Returns
Int

the boxView to add a constraint on the left

rightOfWidget

Added in 1.1.0-alpha13
fun rightOfWidget(i: Int): Int

Get the boxView for the widget i to add a constraint on the right

Parameters
i: Int

the widget that has the order as i in the constraint_reference_ids

Returns
Int

the boxView to add a constraint on the right

setColumns

Added in 1.1.0-alpha13
fun setColumns(columns: Int): Unit

set new columns value

Parameters
columns: Int

new rows value

setNumWidgets

Added in 1.1.0-alpha13
fun setNumWidgets(num: Int): Unit

Set new NumWidgets value

Parameters
num: Int

how many widgets to be arranged in Grid

setOrientation

Added in 1.1.0-alpha13
fun setOrientation(orientation: Int): Unit

set new orientation value

Parameters
orientation: Int

new orientation value

setRows

Added in 1.1.0-alpha13
fun setRows(rows: Int): Unit

set new rows value

Parameters
rows: Int

new rows value

setSkips

Added in 1.1.0-alpha13
fun setSkips(skips: String!): Unit

set new skips value

Parameters
skips: String!

new spans value

setSpans

Added in 1.1.0-alpha13
fun setSpans(spans: CharSequence!): Unit

set new spans value

Parameters
spans: CharSequence!

new spans value

setup

Added in 1.1.0-alpha13
fun setup(): Unit

Set up the Grid engine.

topOfWidget

Added in 1.1.0-alpha13
fun topOfWidget(i: Int): Int

Get the boxView for the widget i to add a constraint on the top

Parameters
i: Int

the widget that has the order as i in the constraint_reference_ids

Returns
Int

the boxView to add a constraint on the top