public class Spacing
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ALL
Spacing type that represents all directions (left, top, right, bottom).
|
static int |
BOTTOM
Spacing type that represents the bottom direction.
|
static int |
END
Spacing type that represents end direction e.g.
|
static int |
HORIZONTAL
Spacing type that represents horizontal direction (left and right).
|
static int |
LEFT
Spacing type that represents the left direction.
|
static int |
RIGHT
Spacing type that represents the right direction.
|
static int |
START
Spacing type that represents start direction e.g.
|
static int |
TOP
Spacing type that represents the top direction.
|
static int |
VERTICAL
Spacing type that represents vertical direction (top and bottom).
|
Modifier and Type | Method and Description |
---|---|
float |
get(int spacingType)
Get the spacing for a direction.
|
float |
getRaw(int spacingType)
Get the raw value (that was set using
set(int, float) ), without taking into account
any default values. |
void |
reset()
Resets the spacing instance to its default state.
|
boolean |
set(int spacingType,
float value)
Set a spacing value.
|
public static final int LEFT
marginLeft
.public static final int TOP
marginTop
.public static final int RIGHT
marginRight
.public static final int BOTTOM
marginBottom
.public static final int START
public static final int END
public static final int HORIZONTAL
marginHorizontal
.public static final int VERTICAL
marginVertical
.public static final int ALL
margin
.public boolean set(int spacingType, float value)
public float get(int spacingType)
public float getRaw(int spacingType)
set(int, float)
), without taking into account
any default values.public void reset()
Spacing
instances.