public class GridEngine


GridEngine class contains the main logic of the Grid Helper

Summary

Constants

static final int
static final int

Public constructors

GridEngine(int rows, int columns)
GridEngine(int rows, int columns, int numWidgets)

Public methods

int

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

int
leftOfWidget(int i)

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

void
setColumns(int columns)

set new columns value

void
setNumWidgets(int num)

Set new NumWidgets value

void
setOrientation(int orientation)

set new orientation value

void
setRows(int rows)

set new rows value

void

set new skips value

void

set new spans value

void

Set up the Grid engine.

int
topOfWidget(int i)

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

Constants

HORIZONTAL

Added in 1.1.0-alpha13
public static final int HORIZONTAL = 0

VERTICAL

Added in 1.1.0-alpha13
public static final int VERTICAL = 1

Public constructors

GridEngine

Added in 1.1.0-alpha13
public GridEngine()

GridEngine

Added in 1.1.0-alpha13
public GridEngine(int rows, int columns)

GridEngine

Added in 1.1.0-alpha13
public GridEngine(int rows, int columns, int numWidgets)

Public methods

bottomOfWidget

Added in 1.1.0-alpha13
public int bottomOfWidget(int i)

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

Parameters
int i

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
public int leftOfWidget(int i)

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

Parameters
int i

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
public int rightOfWidget(int i)

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

Parameters
int i

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
public void setColumns(int columns)

set new columns value

Parameters
int columns

new rows value

setNumWidgets

Added in 1.1.0-alpha13
public void setNumWidgets(int num)

Set new NumWidgets value

Parameters
int num

how many widgets to be arranged in Grid

setOrientation

Added in 1.1.0-alpha13
public void setOrientation(int orientation)

set new orientation value

Parameters
int orientation

new orientation value

setRows

Added in 1.1.0-alpha13
public void setRows(int rows)

set new rows value

Parameters
int rows

new rows value

setSkips

Added in 1.1.0-alpha13
public void setSkips(String skips)

set new skips value

Parameters
String skips

new spans value

setSpans

Added in 1.1.0-alpha13
public void setSpans(CharSequence spans)

set new spans value

Parameters
CharSequence spans

new spans value

setup

Added in 1.1.0-alpha13
public void setup()

Set up the Grid engine.

topOfWidget

Added in 1.1.0-alpha13
public int topOfWidget(int i)

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

Parameters
int i

the widget that has the order as i in the constraint_reference_ids

Returns
int

the boxView to add a constraint on the top