GridEngine
class GridEngine
GridEngine class contains the main logic of the Grid Helper
Summary
Constants |
|
---|---|
const Int |
HORIZONTAL = 0 |
const Int |
VERTICAL = 1 |
Public constructors |
---|
GridEngine(rows: Int, columns: Int) |
GridEngine(rows: Int, columns: Int, numWidgets: Int) |
Public functions |
|
---|---|
Int |
bottomOfWidget(i: Int) Get the boxView for the widget i to add a constraint on the bottom |
Int |
leftOfWidget(i: Int) Get the boxView for the widget i to add a constraint on the left |
Int |
rightOfWidget(i: Int) Get the boxView for the widget i to add a constraint on the right |
Unit |
setColumns(columns: Int) set new columns value |
Unit |
setNumWidgets(num: Int) Set new NumWidgets value |
Unit |
setOrientation(orientation: Int) set new orientation value |
Unit |
set new rows value |
Unit |
set new skips value |
Unit |
setSpans(spans: CharSequence!) set new spans value |
Unit |
setup() Set up the Grid engine. |
Int |
topOfWidget(i: Int) Get the boxView for the widget i to add a constraint on the top |
Constants
Public constructors
Public functions
bottomOfWidget
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
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
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
fun setColumns(columns: Int): Unit
set new columns value
Parameters | |
---|---|
columns: Int |
new rows value |
setNumWidgets
fun setNumWidgets(num: Int): Unit
Set new NumWidgets value
Parameters | |
---|---|
num: Int |
how many widgets to be arranged in Grid |
setOrientation
fun setOrientation(orientation: Int): Unit
set new orientation value
Parameters | |
---|---|
orientation: Int |
new orientation value |
setRows
fun setRows(rows: Int): Unit
set new rows value
Parameters | |
---|---|
rows: Int |
new rows value |
setSkips
fun setSkips(skips: String!): Unit
set new skips value
Parameters | |
---|---|
skips: String! |
new spans value |
setSpans
fun setSpans(spans: CharSequence!): Unit
set new spans value
Parameters | |
---|---|
spans: CharSequence! |
new spans value |