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